LINKER PROBLEM

Help
samymajed
2013-06-04
2013-06-04
  • samymajed

    samymajed - 2013-06-04

    VS C++ Express 2012
    IT++ 4.3.0

    I built IT++ with no problems, when I try to link with it to my code, I get the following linker code (I have set all environment variables in windows and project dependencies/directories correctly in VS)

    the problem seems to be stemming from BLAS and LAPACK, because when I set #undef HAVE_ACML in my code, everything works, but of course I am missing all the ACML goodies.... anyone knows what is wrong?

    ========================================================

    Error 1 error LNK2019: unresolved external symbol _DSWAP referenced in function "void cdecl itpp::swap_vector(int,double ,double )" (?swap_vector@itpp@@YAXHPAN0@Z) itpp_debug.lib(copy_vector.obj) TestingITPP
    Error 2 error LNK2019: unresolved external symbol _ZSWAP referenced in function "void
    cdecl itpp::swap_vector(int,class std::complex<double> ,class std::complex<double> )" (?swap_vector@itpp@@YAXHPAV?$complex@N@std@@0@Z) itpp_debug.lib(copy_vector.obj) TestingITPP
    Error 3 error LNK2019: unresolved external symbol _DSCAL referenced in function "void cdecl itpp::scal_vector(int,double,double *)" (?scal_vector@itpp@@YAXHNPAN@Z) itpp_debug.lib(copy_vector.obj) TestingITPP
    Error 4 error LNK2019: unresolved external symbol _ZSCAL referenced in function "void
    cdecl itpp::scal_vector(int,class std::complex<double>,class std::complex<double> )" (?scal_vector@itpp@@YAXHV?$complex@N@std@@PAV23@@Z) itpp_debug.lib(copy_vector.obj) TestingITPP
    Error 5 error LNK2019: unresolved external symbol _DCOPY referenced in function "void cdecl itpp::copy_vector(int,double const ,int,double ,int)" (?copy_vector@itpp@@YAXHPBNHPANH@Z) itpp_debug.lib(copy_vector.obj) TestingITPP
    Error 6 error LNK2019: unresolved external symbol _ZCOPY referenced in function "void
    cdecl itpp::copy_vector(int,class std::complex<double> const
    ,int,class std::complex<double> ,int)" (?copy_vector@itpp@@YAXHPBV?$complex@N@std@@HPAV23@H@Z) itpp_debug.lib(copy_vector.obj) TestingITPP
    Error 7 error LNK2019: unresolved external symbol _DAXPY referenced in function "void cdecl itpp::axpy_vector(int,double,double const ,int,double ,int)" (?axpy_vector@itpp@@YAXHNPBNHPANH@Z) itpp_debug.lib(copy_vector.obj) TestingITPP
    Error 8 error LNK2019: unresolved external symbol _ZAXPY referenced in function "void
    cdecl itpp::axpy_vector(int,class std::complex<double>,class std::complex<double> const
    ,int,class std::complex<double> ,int)" (?axpy_vector@itpp@@YAXHV?$complex@N@std@@PBV23@HPAV23@H@Z) itpp_debug.lib(copy_vector.obj) TestingITPP
    Error 9 error LNK2019: unresolved external symbol _DDOT referenced in function "double cdecl itpp::dot<double>(class itpp::Vec<double> const &,class itpp::Vec<double> const &)" (??$dot@N@itpp@@YANABV?$Vec@N@0@0@Z) itpp_debug.lib(vec.obj) TestingITPP
    Error 10 error LNK2019: unresolved external symbol _DGER referenced in function "class itpp::Mat<double>
    cdecl itpp::outer_product<double>(class itpp::Vec<double> const &,class itpp::Vec<double> const &,bool)" (??$outer_product@N@itpp@@YA?AV?$Mat@N@0@ABV?$Vec@N@0@0_N@Z) itpp_debug.lib(vec.obj) TestingITPP
    Error 11 error LNK2019: unresolved external symbol _ZGERU referenced in function "class itpp::Mat<class std::complex<double=""> > cdecl itpp::outer_product<class std::complex<double=""> >(class itpp::Vec<class std::complex<double=""> > const &,class itpp::Vec<class std::complex<double=""> > const &,bool)" (??$outer_product@V?$complex@N@std@@@itpp@@YA?AV?$Mat@V?$complex@N@std@@@0@ABV?$Vec@V?$complex@N@std@@@0@0_N@Z) itpp_debug.lib(vec.obj) TestingITPP
    Error 12 error LNK2019: unresolved external symbol _ZGERC referenced in function "class itpp::Mat<class std::complex<double=""> >
    cdecl itpp::outer_product<class std::complex<double=""> >(class itpp::Vec<class std::complex<double=""> > const &,class itpp::Vec<class std::complex<double=""> > const &,bool)" (??$outer_product@V?$complex@N@std@@@itpp@@YA?AV?$Mat@V?$complex@N@std@@@0@ABV?$Vec@V?$complex@N@std@@@0@0_N@Z) itpp_debug.lib(vec.obj) TestingITPP
    Error 13 error LNK2019: unresolved external symbol _DGEMV referenced in function "class itpp::Vec<double> cdecl itpp::operator*<double>(class itpp::Mat<double> const &,class itpp::Vec<double> const &)" (??$?DN@itpp@@YA?AV?$Vec@N@0@ABV?$Mat@N@0@ABV10@@Z) itpp_debug.lib(mat.obj) TestingITPP
    Error 14 error LNK2019: unresolved external symbol _ZGEMV referenced in function "class itpp::Vec<class std::complex<double=""> >
    cdecl itpp::operator
    <class std::complex<double=""> >(class itpp::Mat<class std::complex<double=""> > const &,class itpp::Vec<class std::complex<double=""> > const &)" (??$?DV?$complex@N@std@@@itpp@@YA?AV?$Vec@V?$complex@N@std@@@0@ABV?$Mat@V?$complex@N@std@@@0@ABV10@@Z) itpp_debug.lib(mat.obj) TestingITPP
    Error 15 error LNK2019: unresolved external symbol _DGEMM referenced in function "class itpp::Mat<double> cdecl itpp::operator*<double>(class itpp::Mat<double> const &,class itpp::Mat<double> const &)" (??$?DN@itpp@@YA?AV?$Mat@N@0@ABV10@0@Z) itpp_debug.lib(mat.obj) TestingITPP
    Error 16 error LNK2019: unresolved external symbol _ZGEMM referenced in function "class itpp::Mat<class std::complex<double=""> >
    cdecl itpp::operator*<class std::complex<double=""> >(class itpp::Mat<class std::complex<double=""> > const &,class itpp::Mat<class std::complex<double=""> > const &)" (??$?DV?$complex@N@std@@@itpp@@YA?AV?$Mat@V?$complex@N@std@@@0@ABV10@0@Z) itpp_debug.lib(mat.obj) TestingITPP
    Error 17 error LNK2019: unresolved external symbol _DGETRF referenced in function "bool cdecl itpp::inv(class itpp::Mat<double> const &,class itpp::Mat<double> &)" (?inv@itpp@@YA_NABV?$Mat@N@1@AAV21@@Z) itpp_debug.lib(inv.obj) TestingITPP
    Error 18 error LNK2019: unresolved external symbol _ZGETRF referenced in function "bool
    cdecl itpp::inv(class itpp::Mat<class std::complex<double=""> > const &,class itpp::Mat<class std::complex<double=""> > &)" (?inv@itpp@@YA_NABV?$Mat@V?$complex@N@std@@@1@AAV21@@Z) itpp_debug.lib(inv.obj) TestingITPP
    Error 19 error LNK2019: unresolved external symbol _DGETRI referenced in function "bool cdecl itpp::inv(class itpp::Mat<double> const &,class itpp::Mat<double> &)" (?inv@itpp@@YA_NABV?$Mat@N@1@AAV21@@Z)
    itpp_debug.lib(inv.obj) TestingITPP
    Error 20 error LNK2019: unresolved external symbol _ZGETRI referenced in function "bool
    cdecl itpp::inv(class itpp::Mat<class std::complex<double=""> > const &,class itpp::Mat<class std::complex<double=""> > &)" (?inv@itpp@@YA_NABV?$Mat@V?$complex@N@std@@@1@AAV21@@Z) itpp_debug.lib(inv.obj) TestingITPP
    Error 21 error LNK1120: 20 unresolved externals
    TestingITPP.exe TestingITPP

     
  • Bogdan Cristea

    Bogdan Cristea - 2013-06-04

    Your PATH environment variable needs to point to the folder where ACML DLLs reside. Check this from Visual Studio by opening from Tools the Command Window, then type 'set' and press ENTER

     
  • samymajed

    samymajed - 2013-06-04

    Bogdan, thank for your prompt reply, I have set the PATH correctly. I don't have command window in VS (I am using VS C++ Express 2012)... Here is my path variable (some of it)
    C:\AMD\acml5.3.1\ifort64\include;C:\AMD\acml5.3.1\ifort64\lib

    note that, I used PGI instead of ifort, same linker problem!

    after I changed the PATH, I restarted windows, to no avail, what is the significance of running "set" from the command window in VS? Thanks

     
  • Bogdan Cristea

    Bogdan Cristea - 2013-06-04

    Command prompt of VS2012 can be accessed as explained here: http://social.msdn.microsoft.com/Forums/en-US/vstsprofiler/thread/e9351668-80b1-4c7c-802a-c9fdc3bd82bf

    The set command allows to display all environment variables, including PATH

    There should be no reason for not being able to link against ACML library if your path is correct provided that your project is for x86_64 architecture. Does cmake detect ACML ? What compiler have you selected for this (only x64_64 should work) ?

     
    Last edit: Bogdan Cristea 2013-06-04
  • samymajed

    samymajed - 2013-06-04

    Bogdan, thanks! Yeah, there was an issue with the library setting (the one corresponding to the X64 arch).... I needed to set the correct library name for X64 (ittp_acml.lib) rather than ittp_debug.lib (which is Win32 o/p)... Now linking works with no problems... thanks again.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks