LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-19-2004, 12:13 PM   #1
ofada
Member
 
Registered: Jan 2004
Posts: 32

Rep: Reputation: 15
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
 
Old 04-19-2004, 01:37 PM   #2
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
Do you have libdetect.a, or just libdetect.so? I think for static linking you need the .a files.
 
Old 04-20-2004, 04:49 AM   #3
ofada
Member
 
Registered: Jan 2004
Posts: 32

Original Poster
Rep: Reputation: 15
No I just have libdetect.so.How can I make dynamic linking with g++?
Thank you
 
Old 04-20-2004, 08:28 AM   #4
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
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.
 
Old 04-20-2004, 10:17 AM   #5
ofada
Member
 
Registered: Jan 2004
Posts: 32

Original Poster
Rep: Reputation: 15
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!
 
Old 04-20-2004, 10:43 AM   #6
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
The crypto library is part of the OpenSSL libraries. Do a google search, and you might turn something up.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration