Try -lcgicc, which will tell the linker that you want to link to the cgicc library. It won't automatically do that unless you explicitly tell it.
Hello,
I am having a problem with cgicc-3.2.19, and am hoping you can advise.
I downloaded cgicc-3.2.19.tar.gz from your website
http://ftp.gnu.org/gnu/cgicc, and built and installed it as per your
instructions in the INSTALL file. Then I found that the example
directory did not have a makefile in it. Consequently, I was unable to
make example.cc.
So I created an Eclipse C++ project, and put example.cc in it. I was
able to successfully compile it, but got a bunch of link errors. I
also got the same errors from the command line:
$ g++ -o "CgiTest" ./src/CgiTest.o
./src/CgiTest.o: In function `main':
/home/Family/Projects/CgiTest/Debug/../src/CgiTest.cpp:41:
undefined reference to `cgicc::Cgicc::Cgicc(cgicc::CgiInput*)'
/home/Family/Projects/CgiTest/Debug/../src/CgiTest.cpp:44:
undefined reference to `cgicc::HTTPHTMLHeader::HTTPHTMLHeader()'
...
I got the same errors when I did:
$ g++ -L/usr/lib64 -o "CgiTest" ./src/CgiTest.o
Finally, I did
$ nm -aC /usr/lib64/libcgicc.so
and the following came out for the Cgicc constructor:
0000000000017fc0 T cgicc::Cgicc::Cgicc(cgicc::CgiInput*)
which appears to show that the library was in fact built correctly.
What am I doing wrong? Why is the g++ linker not able to link the
program?
Any help much appreciated!
Thanks!
R. Krishnaswamy