Menu

Visual Studio 2013 - Build Error

Help
lucas
2015-02-15
2015-02-27
  • lucas

    lucas - 2015-02-15

    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 itpp

    Error 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 itpp

    Error 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 itpp

    Error 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 itpp

    Error 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 itpp

    Error 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 itpp

    Error 7 error LNK1120: 2 unresolved externals C:\itpp-4.3.1\build\itpp\Release\itpp_rel.dll itpp

    Please, help me.

     
  • Bogdan Cristea

    Bogdan Cristea - 2015-02-15

    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

     
    • lucas

      lucas - 2015-02-15

      I used the CMAKE_BUILD_TYPE and set it as Release and it still doesn't work.

       
  • Bogdan Cristea

    Bogdan Cristea - 2015-02-16

    Could you provide a full description of your system in order to reproduce your problem: OS, external libs, bitness, etc ?

     
    • lucas

      lucas - 2015-02-19

      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
  • Bogdan Cristea

    Bogdan Cristea - 2015-02-27

    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.

     

Log in to post a comment.