Reputation: 159
I'm not able to install this library on Ubuntu, or at least to compile a .cpp
linking the library to it. I have finish all Google and StackOverflow answers.
So ok, first of all I run cmake
and after I run make
(and make install
to be sure). Still, if I run g++ xxx.cpp -lcrb -o test
I get this error: fatal error: CRNB.h: No such file or directory
. The library doesn't like to be installed yet, so I copy the libcrn.so
file to /usr/lib
and I run sudo ldconfig
to load it. Now...
sudo ldconfig -n -v /usr/lib/
says it's properly installed (not before copying the .so
file).g++ -lcrn
says it's properly installed because returns undefined reference to 'main'
and not cannot find -lcrn
(as before copying the .so
file)ldd /bin/ls
doesn't list the library, which means it's not installedAnyways, trying to compile still throws the same error. I have also tried...
.conf
file and add it to the folder /etc/ld.so.conf.d/
.so
file to /usr/lib
/usr/local/lib
and in /lib
folders/etc/ld.so.conf
pathsLD_LIBRARY_PATH
to the path of the .so
fileAnd many more similar. As you can see all this things are the same, so it's clear that I'm losing something important. Anyone knows what it could be?
Thanks a lot!
Upvotes: 0
Views: 1859
Reputation: 249
You need to specify with "-I" flag the include directories, or import it to your system.
Try:
g++ src_name.cpp -L./your/library -lcrn -I./your/headers -o out_name -std=c++11
Or:
You can copy from libcrn include files ("*.h") to "/usr/local/include/" and the library to "/usr/local/lib/" if doesn't exist, and then:
g++ src_name.cpp -lcrn -o out_name -std=c++11
Upvotes: 1