help-cgicc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-cgicc] problems configuring with fastcgi


From: Vlad D. Markov
Subject: Re: [help-cgicc] problems configuring with fastcgi
Date: Mon, 5 Apr 2004 22:04:03 -0400

On Mon, 5 Apr 2004 15:36:40 -0400 (EDT)
Jiann-Ming Su <address@hidden> wrote:

> I have fastcgi libraries installed in /opt/lib.  "/opt/lib" has been added
> to /etc/ld.so.conf.  I've ran "ldconfig".  When I try to configure cgicc, I
> get the following error:
> 
>   # ./configure --prefix=/opt --enable-fcgi-demos
>   checking whether to build the cgicc demos... yes
>   checking whether to build the cgicc fcgi demos... yes
>   checking for FCGX_Accept in -lfcgi... no
>   configure: error: FastCGI libraries not found
> 
> What am I missing?
> 
I suspect it can't find the include files, the ".h" files.
Is fastCGI installed in "/opt" also? Maybe setting 
CCFLAGS="-I/opt/include"` and CXXFLAGS="-I/opt/include"
may get you going.

I had some problems with cgicc & fastCGI which I overcame.
I am not a C++ coder though so my solution may not be the
best. I did this to make it work (FCgiIO.cc):

CGICCNS FCgiIO::FCgiIO(FCGX_Request& request)
  : std::ostream(&fOutBuf),
         fRequest(request),
         fOutBuf(request.out),
         fErrBuf(request.err),
         fErr(&fErrBuf)
{
  rdbuf(&fOutBuf);
  fErr.rdbuf(&fErrBuf);
  cout.rdbuf(&fOutBuf);
  cerr.rdbuf(&fErrBuf);

  // Parse environment
  for(char **e = fRequest.envp; *e != NULL; ++e) {
    std::string s(*e);                            
    std::string::size_type i = s.find('=');
/******
    if(i != std::string::npos)
      throw std::runtime_error("Illegally formed environment");
******/
    fEnv[s.substr(0, i)] = s.substr(i + 1);
  }
}

fastCGI is really nice. Looks to me like Java Servlets
got a few of their ideas from fastCGI. cgicc works well
also.

good luck,
Vlad




reply via email to

[Prev in Thread] Current Thread [Next in Thread]