Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 01-06-2010, 10:55 AM   #1
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:
$ 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:
$ ls /usr/lib/libfcgi*
/usr/lib/libfcgi.a     /usr/lib/      /usr/lib/
/usr/lib/libfcgi++.a   /usr/lib/    /usr/lib/
/usr/lib/    /usr/lib/
/usr/lib/  /usr/lib/
I have tried to follow these instructions. The files in the tar.gz archive provided by 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
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
Old 01-06-2010, 12:23 PM   #3
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.


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 06:43 PM.

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