Aron Szabo | 20 Jul 2010 13:14

Re: undefined reference to `FCGX_GetParam'

Hi Doru!

Try it this way:
gcc test.c -o test -lfcgi

Cu stima,
Aron Sabo

On 07/20/2010 01:03 PM, Doru Georgescu wrote:
> Thank you for your answer.
>
> I am still trying to run fcgi on my Ubuntu server 8.04 lts hardy heron.
>
> I performed the following steps:
> 1. I reinstalled the system. This has removed any problems created by me trying to compile the kit.
> 2. I installed the packages:
> apache2
> libapache2-mod-fastcgi
> libfcgi-dev
> libfcgi0ldbl (libfcgi-dev depends on this one)
>
> I could not find the packages:
> libfcgi
> libfcgi0
> libfcgi0c2
>
> I used this page:
> http://packages.ubuntu.com/
> to search for libfcgi0 in any distribution and it is obvious that it was included after Hardy.
>
> Now I tried to compile this program:
>      #include "fcgi_stdio.h"
>      #include<stdlib.h>
>
>      void main(void)
>      {
>          int count = 0;
>          while(FCGI_Accept()>= 0)
>              printf("Content-type: text/html\r\n"
>                     "\r\n"
>                     "<title>FastCGI Hello!</title>"
>                     "<h1>FastCGI Hello!</h1>"
>                     "Request number %d running on host<i>%s</i>\n",
>                      ++count, getenv("SERVER_NAME"));
>      }
> from this page:
> http://www.fastcgi.com/devkit/doc/fcgi-devel-kit.htm
> using:
> gcc count.c
> and I got the same errors:
> count.c:(.text+0x3d): undefined reference to `FCGI_printf'
> count.c:(.text+0x42): undefined reference to `FCGI_Accept'
> This is all that I need, to get this program running. However, the problem seems way over my head. Currently
I am using a "pseudo" fast cgi, a small program that loads fast and communicates with the big process that
stays in the memory. If you have any suggestions, please shoot.
>
> Other metaphysical problems that bother me are:
> 1. I am writing an application which requires the same process to be accessed by all incoming requests. Is
this supposed to be configured inside the web server configuration files? Is this the default
configuration in my Ubuntu?
> 2. I need to read get parameters for every request. Are they every time in their place, accessible through
getenv, as it is shown in the example above?
>
> Thank you for your time,
> Doru
>
> --- On Thu, 6/24/10, Rob<rclemley@...>  wrote:
>
>    
>> From: Rob<rclemley@...>
>> Subject: Re: [FASTCGI] undefined reference to `FCGX_GetParam'
>> To: "Doru Georgescu"<headset001@...>
>> Cc: "fastcgi fcgi"<fastcgi-developers@...>
>> Date: Thursday, June 24, 2010, 1:24 PM
>>    On 06/24/2010 03:30 AM, Doru
>> Georgescu wrote:
>>      
>>> Some FastCGI developers please send to me the compile
>>>        
>> command they use to compile the FastCGI library, together
>> with the current directory where they run it in the fastcgi
>> directory tree and the version of the operating system they
>> use. It might help me to compile FastCGI on Ubuntu.
>>      
>>> If anyone knows about compiling FastCGI on
>>>        
>> Linux/Ubuntu, whether is works or not, please let me know.
>>
>> Not sure why you want to build it on Ubuntu, because there
>> are pre-built fastcgi binaries available in the Ubuntu
>> universe repositories.
>>
>> Yes it works.  These packages are available in both
>> Hardy and Maverick, and I assume all versions in
>> between.  If you need to recompile for some reason, I'd
>> suggest you get the source package and build it with
>> dpkg-buildpackage.
>>
>> If you don't need to build it, just do "aptitude install
>> libfcgi-dev" or whichever of the packages you need.
>>
>>
>> $ dpkg-query -W '*f*cgi*'
>> libapache2-mod-fastcgi  2.4.6-0ubuntu1
>> libfcgi
>> libfcgi-dev     2.4.0-7
>> libfcgi0
>> libfcgi0c2
>> libfcgi0ldbl    2.4.0-7
>> $
>>
>>
>>
>>
>>      
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> FastCGI-developers mailing list
> FastCGI-developers@...
> http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
>    

Attachment (aron.vcf): text/x-vcard, 176 bytes
_______________________________________________
FastCGI-developers mailing list
FastCGI-developers@...
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers

Gmane