我已经在Visual Studio 2015 x64中成功编译和构建了ilmbase-2.2.1库。但我在链接dwaLookups项目(调试和发布)方面遇到了问题。该项目具有以下预处理器定义
WIN32
_WINDOWS
_DEBUG
HAVE_CONFIG_H
ILM_IMF_TEST_IMAGEDIR="D:/SDK/OpenEXR/openexr-2.2.1/IlmImfTest/"
OPENEXR_DLL
ILMIMF_EXPORTS
CMAKE_INTDIR="Debug"
运行时库设置为多线程调试DLL(/ MDd)并链接以下库的调试版本 Half.lib,Iex-2_2.lib,IlmThread-2_2.lib
项目有以下链接错误
1>dwaLookups.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl IlmThread::supportsThreads(void)" (__imp_?supportsThreads@IlmThread@@YA_NXZ) referenced in function "int __cdecl cpuCount(void)" (?cpuCount@@YAHXZ)
1>dwaLookups.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl IlmThread::Thread::Thread(void)" (__imp_??0Thread@IlmThread@@QEAA@XZ) referenced in function "public: __cdecl `anonymous namespace'::LutHeaderWorker::Runner::Runner(class A0x2e87040a::LutHeaderWorker &,bool)" (??0Runner@LutHeaderWorker@?A0x2e87040a@@QEAA@AEAV12@_N@Z)
1>dwaLookups.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl IlmThread::Thread::~Thread(void)" (__imp_??1Thread@IlmThread@@UEAA@XZ) referenced in function "int `public: __cdecl `anonymous namespace'::LutHeaderWorker::Runner::Runner(class LutHeaderWorker::Runner &,bool)'::`1'::dtor$0" (?dtor$0@?0???0Runner@LutHeaderWorker@?A0x2e87040a@@QEAA@AEAV12@_N@Z@4HA)
1>dwaLookups.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl IlmThread::Thread::start(void)" (__imp_?start@Thread@IlmThread@@QEAAXXZ) referenced in function "public: __cdecl `anonymous namespace'::LutHeaderWorker::Runner::Runner(class A0x2e87040a::LutHeaderWorker &,bool)" (??0Runner@LutHeaderWorker@?A0x2e87040a@@QEAA@AEAV12@_N@Z)
1>dwaLookups.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl IlmThread::Semaphore::Semaphore(unsigned int)" (__imp_??0Semaphore@IlmThread@@QEAA@I@Z) referenced in function "public: __cdecl `anonymous namespace'::LutHeaderWorker::Runner::Runner(class A0x2e87040a::LutHeaderWorker &,bool)" (??0Runner@LutHeaderWorker@?A0x2e87040a@@QEAA@AEAV12@_N@Z)
1>dwaLookups.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl IlmThread::Semaphore::~Semaphore(void)" (__imp_??1Semaphore@IlmThread@@UEAA@XZ) referenced in function "int `public: __cdecl `anonymous namespace'::LutHeaderWorker::Runner::Runner(class LutHeaderWorker::Runner &,bool)'::`1'::dtor$1" (?dtor$1@?0???0Runner@LutHeaderWorker@?A0x2e87040a@@QEAA@AEAV12@_N@Z@4HA)
1>dwaLookups.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl IlmThread::Semaphore::wait(void)" (__imp_?wait@Semaphore@IlmThread@@QEAAXXZ) referenced in function "public: virtual __cdecl `anonymous namespace'::LutHeaderWorker::Runner::~Runner(void)" (??1Runner@LutHeaderWorker@?A0x2e87040a@@UEAA@XZ)
1>dwaLookups.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl IlmThread::Semaphore::post(void)" (__imp_?post@Semaphore@IlmThread@@QEAAXXZ) referenced in function "public: virtual void __cdecl `anonymous namespace'::LutHeaderWorker::Runner::run(void)" (?run@Runner@LutHeaderWorker@?A0x2e87040a@@UEAAXXZ)`