LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   librairy g++ libdetect (https://www.linuxquestions.org/questions/programming-9/librairy-g-libdetect-172095/)

ofada 04-19-2004 12:13 PM

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

deiussum 04-19-2004 01:37 PM

Do you have libdetect.a, or just libdetect.so? I think for static linking you need the .a files.

ofada 04-20-2004 04:49 AM

No I just have libdetect.so.How can I make dynamic linking with g++?
Thank you

deiussum 04-20-2004 08:28 AM

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.

ofada 04-20-2004 10:17 AM

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!

deiussum 04-20-2004 10:43 AM

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.