W3C home > Mailing lists > Public > www-lib@w3.org > April to June 2004

compilation problem: undefined reference to `_HTXML_new'

From: José María Vallet <jose.vallet@hut.fi>
Date: Thu, 29 Apr 2004 18:56:27 +0300
Message-ID: <001501c42e02$88124ed0$1378e982@aut19>
To: <www-lib@w3.org>

Hello, I have a problem while trying to compile several simple examples
taken from the web.

I will explain what I have done from the begining.

First I tryed to install the latest version form CVS, but I got problems
while compilinng.

Then, I tryed with a precompiled binary from

Just after I finished (it only required "untar" the file)  I found a later
version in a tgz package in the web
(http://www.w3.org/Library/Distribution.html), so decided to install it.

I downloaded the file, expanded it, and run ./configure, make and make
install. No problems, everything went smoothly.

Then I tryed to compile the first examples taken straight from  www.w3.org.
I first took the Start and Stop the Library  from  Easy Startup sample apps,
copyed it straight to the Xemacs, save it with the name "loadfile.c" and
prepare the following Makefile:

loadfile.exe: loadfile.o
 gcc -o loadfile loadfile.o `libwww-config --libs`

loadfile.o: loadfile.c
 gcc -c `libwww-config --cflags` loadfile.c

then I run "make" and compiles, no problem.

Then I take the second example,  Default Initialization of libwww , and copy
it straigt to xemacs (delete the previous example) and save it. Then I run
"make" and gives me the following compilation error:

make loadfile.exe
gcc -c `libwww-config --cflags` loadfile.c
gcc -o loadfile loadfile.o `libwww-config --libs`
/usr/local/lib/libwwwapp.a(HTInit.o)(.text+0x5cd): In function
/usr/tmp/w3c-libwww-5.4.0/Library/src/HTInit.c:87: undefined reference to
Library/src/HTInit.c:88: undefined reference to `_HTXML_new'
collect2: ld returned 1 exit status
make: *** [loadfile.exe] Error 1

Compilation exited abnormally with code 2 at Thu Apr 29 18:26:05

I can see that it is trying to look for somthing in the directory where I
downloaded the tar file and made the libraries, why?

Can someone tell me what I am doing wrong?


José María Vallet
E-mail: jose.vallet@hut.fi
Automation Technology Laboratory
Helsinki University of Technology
P.O. Box: 5500, 02015 HUT
             Espoo, Finland
Tel:  +358-9-451 3310
Fax: +358-9-451 3308
Received on Thursday, 29 April 2004 12:00:42 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:56 UTC