I am trying to build the it++ library in visual studio 2013 and I am getting some errors. When I try to build it on Debug mode it works perfectly but when I try to build it on Release mode, I get the following errors:
Error 1 error LNK2019: unresolved external symbol "declspec(dllimport) double const log2'::2'::one_over_log2" (imp_?one_over_log2@?1??log2@@9@4NB) referenced in function "class itpp::Mat<int> __cdecl itpp::hadamard(int)" (?hadamard@itpp@@YA?AV?$Mat@H@1@H@Z) C:\itpp-4.3.1\build\itpp\specmat.obj itpp
Could you try to build IT++ on 32 bits ? This implies that you select from CMake GUI VS 32 bits generator. Try both 32 and 64 bits and report back the results.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am trying to build the it++ library in visual studio 2013 and I am getting some errors. When I try to build it on Debug mode it works perfectly but when I try to build it on Release mode, I get the following errors:
Error 1 error LNK2019: unresolved external symbol "declspec(dllimport) double const
log2'::
2'::one_over_log2" (imp_?one_over_log2@?1??log2@@9@4NB) referenced in function "class itpp::Mat<int> __cdecl itpp::hadamard(int)" (?hadamard@itpp@@YA?AV?$Mat@H@1@H@Z) C:\itpp-4.3.1\build\itpp\specmat.obj itppError 2 error LNK2001: unresolved external symbol "declspec(dllimport) double const
log2'::
2'::one_over_log2" (imp_?one_over_log2@?1??log2@@9@4NB) C:\itpp-4.3.1\build\itpp\galois.obj itppError 3 error LNK2001: unresolved external symbol "declspec(dllimport) double const
log2'::
2'::one_over_log2" (imp_?one_over_log2@?1??log2@@9@4NB) C:\itpp-4.3.1\build\itpp\sigfun.obj itppError 4 error LNK2019: unresolved external symbol "declspec(dllimport)
log2'::
2'::`local static guard'{2}'" (imp_??_B?1??log2@@9@51) referenced in function "class itpp::Mat<int> __cdecl itpp::hadamard(int)" (?hadamard@itpp@@YA?AV?$Mat@H@1@H@Z) C:\itpp-4.3.1\build\itpp\specmat.obj itppError 5 error LNK2001: unresolved external symbol "declspec(dllimport)
log2'::
2'::`local static guard'{2}'" (imp_??_B?1??log2@@9@51) C:\itpp-4.3.1\build\itpp\galois.obj itppError 6 error LNK2001: unresolved external symbol "declspec(dllimport)
log2'::
2'::`local static guard'{2}'" (imp_??_B?1??log2@@9@51) C:\itpp-4.3.1\build\itpp\sigfun.obj itppError 7 error LNK1120: 2 unresolved externals C:\itpp-4.3.1\build\itpp\Release\itpp_rel.dll itpp
Please, help me.
Hi
You should use the cmake variable CMAKE_BUILD_TYPE in order to set the build type (Release or Debug) instead of selecting it from Visual Studio.
regards
Bogdan
I used the CMAKE_BUILD_TYPE and set it as Release and it still doesn't work.
Could you provide a full description of your system in order to reproduce your problem: OS, external libs, bitness, etc ?
I use Windows 8.1, 64 bits, I linked itpp to ADM's ACML and I use Visual Studio 2013 community.
Also, when I try to build the project on Release mode, a lot of warnings about inconsistent dll linkage appear.
Last edit: lucas 2015-02-19
Could you try to build IT++ on 32 bits ? This implies that you select from CMake GUI VS 32 bits generator. Try both 32 and 64 bits and report back the results.