I've installed GMP 6.1.2, I'm using gcc 5.4, I'm running Ubuntu 16.04.1. I'm compiling a .cpp
file that uses gmpxx
using g++ -std=c++11 -o code -I/path/to/file code.cpp -lgmpxx -lgmp
, after running I obtain the error
/usr/bin/ld: cannot find -lgmpxx collect2: error: ld returned 1 exit status
I've read all the threads I could find for this problem but in my case nothing seemed to worked, others usually didn't have the library installed or had to use -L
to indicate the library location, none of these worked for me. The file that needs to be searched is gmpxx.h
.
In addition, I use the same command to compile in another computer and it works, the only difference is -std=c++11
included in the command shown but this is due to the gcc version I'm using.
Aucun commentaire:
Enregistrer un commentaire