help with C++ and FastCGI

Mark Brown (mbrown@OpenMarket.com)
Fri, 07 Jun 1996 09:21:11 -0400

Message-Id: <199606071321.JAA21665@breckenridge.openmarket.com>
To: fastcgi-developers@OpenMarket.com
Subject: help with C++ and FastCGI
Date: Fri, 07 Jun 1996 09:21:11 -0400
From: Mark Brown <mbrown@OpenMarket.com>


Here's another message that bounced and got misplaced.
(These bounces were caused by a majordomo mis-configuration,
now cured.)  Reply at the bottom.

    --mark

- ------- Forwarded Message
Date: Mon, 27 May 1996 21:35:31 -0500 (CDT)
From: MOSES R DE_JONG <dejo0012@itlabs.umn.edu>
To: fastcgi-developers@OpenMarket.com
Subject: help with c++ and fast cgi


I am trying to get a version of fast cgi to run with c++ but I am
getting an error when I try to compile with CC.

here is my compile line
CC -o run test.C -Iinclude libfcgi/libfcgi.a

i get this back
undefined __eprintf

but when I run this
g++ -o run test.C -Iinclude libfcgi/libfcgi.a

it works fine.

the symbol __eprintf is undefined in the libfcgi.a file using nm.

any ideas?

- ------- End of Forwarded Message

Moses, your problem sounds platform/compiler specific.  For instance,
on Digital UNIX, nm tells me:

    alpha> nm libfcgi.a | grep printf
    sprintf                | 0000000000000000 | U | 0000000000000008
    FCGI_fprintf           | 0000000000003712 | T | 0000000000000008
    FCGI_printf            | 0000000000003936 | T | 0000000000000008
    FCGI_vfprintf          | 0000000000004096 | T | 0000000000000008
    FCGI_vprintf           | 0000000000004272 | T | 0000000000000008
    vfprintf               | 0000000000000000 | U | 0000000000000008

sprintf is called from fcgiapp and vfprintf is called from fcgi_stdio.

Perhaps somebody else has an idea.

The next version of the header files has the conditional 'extern "C"' stuff
for the benefit of C++.  Is anyone already using C++ with FastCGI?

    --mark

------- End of Forwarded Message