I am having problem using IT++ (with ACML) on my new PC. I'm using Windows 7
home premium (64-bit). I have installed ACML (PGI32 and IFORT 64 as well). I
have built IT++ code to make itpp.lib and itpp_debug.lib. When I try to link
my project using IT++, I get a large number of linker errors. Please find an
example code below and also the linker error messages:
Thanks for the reply. I am using ACML 4.4.0 as well. I've checked very
carefully and all directories are specified correctly. In fact if I disable
the path to the library, I understandably get a different error. The error
type I'm getting seems to suggest that libraries are accessible but the
symbols are not loaded properly ... could there be anything to do with 32-bit
vs 64-bit?
Any expert opinion is highly appreciated.
Thank you.
Hassaan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Your problem seems to occur at compilation time. Check your project
configuration in order to correctly specify the ACML library name and path. Do
the IT++ tests compile and run with no errors ? Use as example one of these
projects.
regards
Bogdan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have very carefully checked all the library paths etc. The code compiles
perfectly for the simple project (pasted above) and for the bigger project
(multiple-file). The errors are generated by the linker. All errors are like
this:
itpp_debug_acml32.lib(vec.obj) : 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)
Any further suggestions?
Regards,
Hassaan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Check which acml library is linked with IT++ library, then in your project
make sure that you use the same library. Also, in order to run your program
the PATH variable should contain the path to acml library.
regards
Bogdan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That error shows that some functions used by IT++ from ACML library are not
found at link time. I haven't yet tested IT++ on Win 7, it might be a problem
there, but I am not sure. Could you install and compile IT++ with MKL in order
to check if you get a similar error ?
If you have available, try also on Win XP to compile IT++. That will show us
that your configuration is ok.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your help related to IT++ in general. I tried to use IT++ after ACML installation on AMD with Windows 8 Pro. I have followed all your posts and could get things work except for the linking between BLAS and IT++. It always had unresolved symbols. Eventually, I used another library armadillo that worked smoothly with MSVC++ (2010 express).
In fact I observed that BLAS unresolved symbols disappeared for IT++ when I used pre-compiled BLAS libraries from armadillo, suggesting that may be there is a problem between the interface between it++ and AMD ACML. I am using ACML 5.3.1, PGI version, 64 bit but not _int64 version. I tried ifort version, 5.3.0 but nothing helped.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
Just tried with ACML 5.3.1, ifort64 and IT++ from master branch. You need to be careful when selecting MS Visual Studio in order to use 64 bits version. Similarly, when creating your own projects, make sure that your target platform is 64 bits, otherwise you'll get link errors.
regards
Bogdan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for the help. I didn't succeed with ACML but did manage to run my
code running with MKL. The latest version of MKL requires the following
libraries as input to the linker:
I did get run-time problems initially that I managed to resolve by creating a
working directory and copying above files along with ITPP library (itpp.lib)
into this directory and finally giving the path to this directory in the VC++
directories->Library Directories.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear friends,
I am having problem using IT++ (with ACML) on my new PC. I'm using Windows 7
home premium (64-bit). I have installed ACML (PGI32 and IFORT 64 as well). I
have built IT++ code to make itpp.lib and itpp_debug.lib. When I try to link
my project using IT++, I get a large number of linker errors. Please find an
example code below and also the linker error messages:
/////////////////////////////////Example
Code///////////////////////////////////////
include<iostream>
include<\itpp-4.2\itpp\itbase.h>
using namespace std;
using namespace itpp;
void main()
{
mat m1;
m1.set_size(2,2);
m1.set_row(0,"4 1");
m1.set_row(1,"2 3");
cout<<m1.get_row(0)<<endl;
}
/////////////////////////////////Output
message///////////////////////////////////////
1>------ Build started: Project: test1, Configuration: Debug Win32 ------
1> main.cpp
1>itpp_debug_acml32.lib(vec.obj) : 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)
1>itpp_debug_acml32.lib(vec.obj) : 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)
1>itpp_debug_acml32.lib(vec.obj) : 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?$comple
x@N@std@@@0@ABV?$Vec@V?$complex@N@std@@@0@0_N@Z)
1>itpp_debug_acml32.lib(vec.obj) : 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?$comple
x@N@std@@@0@ABV?$Vec@V?$complex@N@std@@@0@0_N@Z)
1>itpp_debug_acml32.lib(copy_vector.obj) : error LNK2019: unresolved external
symbol _DCOPY referenced in function "void __cdecl
itpp::copy_vector(int,double const ,double )"
(?copy_vector@itpp@@YAXHPBNPAN@Z)
1>itpp_debug_acml32.lib(copy_vector.obj) : error LNK2019: unresolved external
symbol _ZCOPY referenced in function "void __cdecl itpp::copy_vector(int,class
std::complex<double> const ,class std::complex<double> )"
(?copy_vector@itpp@@YAXHPBV?$complex@N@std@@PAV23@@Z)
1>itpp_debug_acml32.lib(copy_vector.obj) : error LNK2019: unresolved external
symbol _DSWAP referenced in function "void __cdecl
itpp::swap_vector(int,double ,double )" (?swap_vector@itpp@@YAXHPAN0@Z)
1>itpp_debug_acml32.lib(copy_vector.obj) : 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)
1>itpp_debug_acml32.lib(copy_vector.obj) : error LNK2019: unresolved external
symbol _DSCAL referenced in function "void __cdecl
itpp::scal_vector(int,double,double *)" (?scal_vector@itpp@@YAXHNPAN@Z)
1>itpp_debug_acml32.lib(copy_vector.obj) : 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)
1>itpp_debug_acml32.lib(copy_vector.obj) : error LNK2019: unresolved external
symbol _DAXPY referenced in function "void __cdecl
itpp::axpy_vector(int,double,double const ,double )"
(?axpy_vector@itpp@@YAXHNPBNPAN@Z)
1>itpp_debug_acml32.lib(copy_vector.obj) : error LNK2019: unresolved external
symbol _ZAXPY referenced in function "void __cdecl itpp::axpy_vector(int,class
std::complex<double>,class std::complex<double> const ,class
std::complex<double> )"
(?axpy_vector@itpp@@YAXHV?$complex@N@std@@PBV23@PAV23@@Z)
1>C:\Users\hassaan\Documents\Visual Studio 2010\Projects\test1\Debug\test1.exe
: fatal error LNK1120: 12 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Please advise what might be wrong. I've been trying hard to make sense of the
problem but feel at a loss. Your help is hugely appreciated.
Hassaan
Hassaan,
I do not have Windows 7.
I am using ACML 4.4.0 in my windows os. Please write the version of ACML you
are using (maybe somebody who is using the same os will help you).
Moreover please be sure, you provided all necessary paths/libs/defines in your
project (specially to ACML).
This site might be helpful:
http://itpp.sourceforge.net/current/linking.html
(Linking your own programs with IT++ using MSVC++ part)
Hope that helps,
Robert
Dear Robert,
Thanks for the reply. I am using ACML 4.4.0 as well. I've checked very
carefully and all directories are specified correctly. In fact if I disable
the path to the library, I understandably get a different error. The error
type I'm getting seems to suggest that libraries are accessible but the
symbols are not loaded properly ... could there be anything to do with 32-bit
vs 64-bit?
Any expert opinion is highly appreciated.
Thank you.
Hassaan
Hi
Your problem seems to occur at compilation time. Check your project
configuration in order to correctly specify the ACML library name and path. Do
the IT++ tests compile and run with no errors ? Use as example one of these
projects.
regards
Bogdan
Thanks for reply Bogdan,
I have very carefully checked all the library paths etc. The code compiles
perfectly for the simple project (pasted above) and for the bigger project
(multiple-file). The errors are generated by the linker. All errors are like
this:
itpp_debug_acml32.lib(vec.obj) : 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)
Any further suggestions?
Regards,
Hassaan
Hi
Check which acml library is linked with IT++ library, then in your project
make sure that you use the same library. Also, in order to run your program
the PATH variable should contain the path to acml library.
regards
Bogdan
Dear Bogdan,
I'm very carefully checked all of above. Can you give me any idea what the
above type of error means?
That error shows that some functions used by IT++ from ACML library are not
found at link time. I haven't yet tested IT++ on Win 7, it might be a problem
there, but I am not sure. Could you install and compile IT++ with MKL in order
to check if you get a similar error ?
If you have available, try also on Win XP to compile IT++. That will show us
that your configuration is ok.
Hello Cristea,
Thanks for your help related to IT++ in general. I tried to use IT++ after ACML installation on AMD with Windows 8 Pro. I have followed all your posts and could get things work except for the linking between BLAS and IT++. It always had unresolved symbols. Eventually, I used another library armadillo that worked smoothly with MSVC++ (2010 express).
In fact I observed that BLAS unresolved symbols disappeared for IT++ when I used pre-compiled BLAS libraries from armadillo, suggesting that may be there is a problem between the interface between it++ and AMD ACML. I am using ACML 5.3.1, PGI version, 64 bit but not _int64 version. I tried ifort version, 5.3.0 but nothing helped.
Hi
Just tried with ACML 5.3.1, ifort64 and IT++ from master branch. You need to be careful when selecting MS Visual Studio in order to use 64 bits version. Similarly, when creating your own projects, make sure that your target platform is 64 bits, otherwise you'll get link errors.
regards
Bogdan
Thank you for the help. I didn't succeed with ACML but did manage to run my
code running with MKL. The latest version of MKL requires the following
libraries as input to the linker:
mkl_core.lib mkl_intel_c.lib mkl_intel_thread.lib libiomp5md.lib
I did get run-time problems initially that I managed to resolve by creating a
working directory and copying above files along with ITPP library (itpp.lib)
into this directory and finally giving the path to this directory in the VC++
directories->Library Directories.