Re: Some errors building varedittest on MSVC

res <[email protected]>
Newsgroups gmane.comp.graphics.crystalspace.devel
Message-ID <[email protected]>
On 15.05.2012 21:45, Andrei Bârsan wrote:
> Now when I want to build varedittest, I get a bunch of wxWidgets-related
> errors, mostly in apps/varedittest/wx/props.cpp, in the class
> implementation macros. For instance:
> 
> Error    111    error C2491: 'wxFlagsProperty::ms_classInfo' :
> definition of dllimport static data member not allowed   
> c:\work\cs\apps\varedittest\wx\propgrid\props.cpp    1499
> 
> Apparently this code claims to be using a DLL that isn't there, causing
> the error, is that correct? Why were those wxWidgets components added
> there? (the propgrid folder) Are they meant to help debug the GUI
> generation code?

The error means that a static data member of a class is being defined
(ie some actual bytes are generated for it, “instantiated” so to say),
although it was previously declared as dllimport (ie it's supposed to be
defined in some outside module, specifically a DLL).

One case where this happens is that wxProps uses some macros to allow
DLL export/import. It may have a name like WXPROPS_DLLEXPORT, or
WXPROPS_PUBLIC, or somesuch. (Or maybe just grep for dllexport or
dllimport in the sources.)
Anyway, the macros is wrongly defined, it resolves to “dllimport”
although it should resolve to “dllexport”, or even nothing if wxprops is
linked statically (probably what you want for an application binary).
The definition of that probably macro likely depends on the presence or
absence of some other macro which control whether the code is imported
from an external DLL, exported from a DLL (ie the DLL is being built) or
should be linked statically. You need to read some code here to find out
what you need to #define or not #define or #undefine to make things work.

-f.r.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
Crystal-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-develop
signature.asc (application/pgp-signature, 262 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+yzkoACgkQNCTzcE/07ey0rACcCHojI1/uABBoj2opXdR9iUHi
N70AoIM8BMTaDY0Q2s40/BGOhp0AU5w6
=fMw9
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.