librairy g++ libdetect
Hi,
I have to compil a program using libdetect library but when I use -static option I can't compil even if libdetect is installed.Here is the error : -------------------------------------------------------- g++ -static -static-libgcc -g -o demon *.o -L/usr/local/lib -lsqlplus -lmysqlclient -ldetect -lncurses -lcrypto /usr/bin/ld: cannot find -ldetect collect2: ld returned 1 exit status make: *** [demon] Erreur 1 ------------------------------------------------------------- Thanks for your help Bye |
Do you have libdetect.a, or just libdetect.so? I think for static linking you need the .a files.
|
No I just have libdetect.so.How can I make dynamic linking with g++?
Thank you |
For dynamic linking, you just don't give gcc the -static flag. From your other post, I don't think that's what you want though, since the user will also need to have the libdetect file installed.
Not sure if there is any way you can statically link that library w/o the .a, unless you can get hold of the source and compile it as a static library instead of a shared (dynamically linked) library. |
OK I've found a rpm with the static library for detect and it is running.
But I have the same problem with the crypto library : I have just .so file and I don't know how to find .a file! |
The crypto library is part of the OpenSSL libraries. Do a google search, and you might turn something up.
|
All times are GMT -5. The time now is 03:11 AM. |