RE: build CGI with libwww

Did you "make install" the library? This must be done as superuser.

Randy

-----Original Message-----
From: www-lib-request@w3.org [mailto:www-lib-request@w3.org]On Behalf Of
#LI CHAOHUI#
Sent: Sunday, February 25, 2001 5:02 AM
To: 'www-lib@w3.org'
Subject: build CGI with libwww


Hi, everyone:

I have tried to build a CGI program using libwww.  However, it seems that
libwww can not be linked into CGI program.  To test it, I built a simple
program as follows:

#include <iostream>
#include <string>

int main()
{
  cout << "Content-type: text/html" << endl << endl;
  cout << "<html>" << endl;
  cout << "It is a test message! << endl;
  cout << "</html>" << endl;
}

When I compile the above code without linking to libwww, the generated cgi
program works normally and is able to output the text specified in the code.
However, if I compile the program with the following command:

g++ -o test.cgi test.cc `libwww-config --cflags` `libwww-config --libs`

the generated cgi program can not work.

Does anybody have idea about this case?  Is libwww able to be used to create
cgi program?

Thanks a lot

Susan Lee

Received on Sunday, 25 February 2001 09:00:50 UTC