[xsd-users] enumerations not exported in dll when
	"generate-inline" enabled
    Boris Kolpackov 
    boris at codesynthesis.com
       
    Tue Mar  1 08:28:39 EST 2011
    
    
  
Hi Matt,
Matt Burnham <mburnham at gblsys.com> writes:
> The resulting class is put in a DLL and when I try and link  an application 
> with the DLL, I get the following link error:
> unresolved external symbol "public: static char const * const * const tmp::action::_xsd_action_literals_" (?_xsd_action_literals_ at action@tmp@@2QBQBDB)
Your DLL export file has the following definitions:
#  ifdef MY_DLL_EXPORT
#    define MY_DLL_DECL __declspec(dllexport)
#  elif MY_DLL_IMPORT
#    define MY_DLL_DECL __declspec(dllimport)
#  else
#    define MY_DLL_DECL // for static lib
#  endif
In particular, it does not import things by default; one has to explicitly
define MY_DLL_IMPORT for that to happen. Naturally, your test does not define
this macro. If add it to the preprocessor definitions in its project file,
everything links fine.
Boris
    
    
More information about the xsd-users
mailing list