Open qmpotential opened 1 year ago
icpc -o test3.run test3.cpp
/tmp/icpcvNHPT6.o: In function CppAD::vector<double> CppAD::ADFun<double, double>::Forward<CppAD::vector<double> >(unsigned long, CppAD::vector<double> const&, std::ostream&)': test3.cpp:(.text._ZN5CppAD5ADFunIddE7ForwardINS_6vectorIdEEEET_mRKS5_RSo[_ZN5CppAD5ADFunIddE7ForwardINS_6vectorIdEEEET_mRKS5_RSo]+0x1114): undefined reference to
CppAD::local::temp_file[abi:cxx11]()'
My code is
int main(){
size_t n = 1; size_t m = 1;
CppAD::vector<CppAD::AD
Y[0] = CppAD::sin(X[0]);
CppAD::ADFun
CppAD::vector
x[0] = 0.5;
jac = f.Jacobian(x);
return 0;
}
Perhaps the following discussions will help ? https://github.com/coin-or/CppAD/discussions/173 https://github.com/coin-or/CppAD/discussions/175
Good morning, Bradbell!
Thank you so much for your links, they are somewhat helpful, but I still have a question about the proper installation. I still have trouble to compile my test program with the reference to the CppAD::local::temp_file[abi:cxx11]()' file.
Do I miss something?
I can see the cppad.hpp file in ../include/cppad/ directory and ../include/cppad/local/temp_file.hpp
Do you have a quick check to find if all the libraries have properly linked ?
Thank you so much in advance.
I suggest that you find where CppADCodeGen has stored its pkg-config file. For example
find dir -name 'cppadcg.pc'
where dir is the prefix for your install of CppADCodeGen.
Let subdir be the sub-directory where the cppadcg.pc file is stored and set export PKG_CONFIG_PATH=full_path_to_subdir
Then execute the command
pkg-config --libs --cflags cppadcg
and you should get all the flags you need to link CppADCodeGen.
Thank you so much it worked, by the way, there is no cppadcg.pc file, but cppad.pc file.
Hey guys, I need your help! I am new to the library. Installing the library like cmake .. make install seems working file but when I run the test file I am getting the following.