LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-06-2010, 10:55 AM   #1
Woppe
LQ Newbie
 
Registered: Jan 2010
Posts: 2

Rep: Reputation: 0
gcc cannot find FastCGI libraries


I've been trying for days now to build my first FastCGI application using gcc.
This is the output:
Code:
$ gcc tiny-fcgi.c -L/usr/lib -llibfcgi
/usr/bin/ld: cannot find -llibfcgi
collect2: ld returned 1 exit status
I believe I wouldn't have to refer to the lib path, but I added the -L flag to be sure.
The directory /usr/lib includes (among others) these files:
Code:
$ ls /usr/lib/libfcgi*
/usr/lib/libfcgi.a     /usr/lib/libfcgi.so      /usr/lib/libfcgi.so.0.0.0
/usr/lib/libfcgi++.a   /usr/lib/libfcgi++.so    /usr/lib/libfcgi++.so.0.0.0
/usr/lib/libfcgi.la    /usr/lib/libfcgi.so.0
/usr/lib/libfcgi++.la  /usr/lib/libfcgi++.so.0
I have tried to follow these instructions. The files in the tar.gz archive provided by FastCGI.com no longer corresponds to the instructions there, but I was still able to run the ./configure and make commands so I believe FastCGI is installed.

But why can not the library be properly linked to? Really hope you can help me out on this one!
 
Old 01-06-2010, 11:15 AM   #2
rnesius
LQ Newbie
 
Registered: Jun 2009
Location: St. Cloud, MN
Distribution: Ubuntu LTS
Posts: 15

Rep: Reputation: 2
Try changing -llibfcgi to -lfcgi. Gcc/gld should expand -lfcgi to libfcgi.so
 
Old 01-06-2010, 12:23 PM   #3
Woppe
LQ Newbie
 
Registered: Jan 2010
Posts: 2

Original Poster
Rep: Reputation: 0
rnesius, you are my hero of today. Thanks alot.
I misinterpreted the manual pages for gcc regarding -l flag.
 
  


Reply

Tags
cgi, fastcgi, gcc, lib, linker


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] are g++ gcc libraries incompatible? bigearsbilly Programming 5 11-20-2009 12:22 PM
Modifying some gcc libraries? HSN Linux - Software 1 10-03-2009 04:49 AM
gcc not seeing libraries kuloch Linux - Software 1 08-30-2008 09:30 PM
gcc-libraries yashwantpinge Programming 3 11-22-2005 12:17 AM
C libraries with GCC compiler Ciccio Programming 2 12-02-2002 11:20 AM


All times are GMT -5. The time now is 01:29 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration