Closed dingld closed 9 years ago
Hi,
You need to pass the folder with the include files to the compiler. If you type the following in your build folder, you will see how to:
make clean
make VERBOSE=1
On my machine, this gives:
cd /home/seba/Desktop/CheMPS2_github/build/tests && /opt/intel/composer_xe_2015.0.090/bin/intel64/icpc -g -O3 -openmp -xHost -ipo -I/home/seba/Desktop/CheMPS2_github/CheMPS2/include/chemps2 -o CMakeFiles/test9.dir/tests/test9.cpp.o -c /home/seba/Desktop/CheMPS2_github/build/tests/tests/test9.cpp
The relevant part for your error is
-I/home/seba/Desktop/CheMPS2_github/CheMPS2/include/chemps2
I hope this helps! If not or in case you have other questions, let me know!
Best wishes, Sebastian
In the first place I thought the same with you. Then I copied the head files to /usr/include, that is why in the picture above I didn't add include-path. But the compile complains quite similarly. I did as you told, and here is what I got. ( I have deleted the head file in /usr/inlcude, and assign path when compiling )
Hi,
So if you have installed with
make install
you either need to specify the headers in your file.ccp as
#include "chemps2/theheader.h"
instead of
#include "theheader.h",
or compile with the full header path by passing it to the compiler:
icpc -g -O3 -openmp -xHost -ipo -fPIC -I/usr/include/chemps2 -o file.o -c file.cpp
icpc -g -O3 -openmp -xHost -ipo file.o -o mybin -L/usr/lib/x86_64-linux-gnu -lchemps2
Can you try with the exact same order of commands as in the two lines above?
Best wishes, Sebastian
I succeeded in installing Chemps2 as guided, and "make test" actually went well. But thins went wrong when I complile test1.cpp using icpc. ( the same issue using g++)