visual studio 2012 can't resolve static fields in a dll lib -
i'm compiling openexr2.0.0 using visual studio 2012 x64 dll, got error:
imflut.obj : error lnk2001: unresolved external symbol "private: static union half::uif const * const half::_tofloat" (?_tofloat@half@@0qbtuif@1@b) imfrgbayca.obj : error lnk2001: unresolved external symbol "private: static unsigned short const * const half::_elut" (?_elut@half@@0qbgb) and looked in half.lib using dumpbin /exports: 
another using dumpbin /exports on half.dll: 
the 2 symbols there. , interestingly, when remove half.lib dependency, vs complain convert unresolved. shows find convert not _tofloat , _elut. differences are: _tofloat , _elut both static fields, convert static method.
class half { ... public: union uif { unsigned int i; float f; }; private: half_export static short convert (int i); half_export static const uif _tofloat[1 << 16]; half_export static const unsigned short _elut[1 << 9]; ... }; my system windows 8 x64. know how fix problem?
you're trying link against __declspec(dllexport)-ed symbols. means need make sure you're __declspec(dllimport)-ing symbols in project file. half - there's #define can add: openexr_dll being checked appearance in halfexport.h , you.
Comments
Post a Comment