W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2001

build CGI with libwww

From: #LI CHAOHUI# <P145163551@ntu.edu.sg>
Date: Sun, 25 Feb 2001 18:02:05 +0800
Message-ID: <147BBF8976F0D211888508002BA60B66088D3146@mail8.ntu.edu.sg>
To: "'www-lib@w3.org'" <www-lib@w3.org>
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 05:02:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:38 GMT