W3C home > Mailing lists > Public > www-lib@w3.org > July to September 2001

RE: libapp_1.obj : error LNK2001: unresolved external symbol _HTLibTerminate

From: Josh Watts <jwatts@pretorynet.com>
Date: Mon, 2 Jul 2001 08:47:30 -0400
Message-ID: <1EB9FCBE69B6154099DF0C4121D1503615A890@pnisvrms001.pretorynet.com>
To: <www-lib@w3.org>
HTLibInit & HTLibTerminate are defined in HTLib.c which is part of
wwwcore. The wwwcore library is linked as part of the wwwapp library. If
you open world.dsw, it shows all the dependencies for the various
libraries. Open the world project workpsace, select the "world" project
and compile. I use it as a base workspace for my projects since it has
all the primary dependencies set up (which is nice for debugging - see
below). When I add my project, I add dependencies to the libraries I
know I'm going to use. Thus, when I make a change to the wwwlib source
code, it'll get recompiled automatically when I recompile my project.

To really do anything with libwww on Win32, you have to compile the
libraries first. And now comes the really tricky part. You may have
compiled all of the libraries yet when you run your app, it may not know
where to find the DLLs. The DLLs have to be within in a directory in
your PATH environment variable or your current directory. You first
thought is "Great, I'll copy it to c:\winnt\system32\" but I really hate
it when junk builds up in my system32 directory - just add the directory
containing the wwwlib DLLs to your path. Note: be careful to only add
either your DEBUG or RELEASE directory - don't add both. It'll be hard
to tell what version DLL you're calling and sometimes the debug info in
the libraries can cause havoc when mixed with the release versions.

If you're debugging in MSVC, there's a better way to do it. Select your
project and click on Project->Settings. Make sure your project is
selected and that the configuration setting is set to "Win32 Debug".
Click on the "Debug" tab. You'll notice that one of the input boxes is
"Working Directory:". Enter the directory of your debug wwwlib DLLs. The
reason to do this is so that you can step into the wwwlib DLLs during
your debug session. This is crucial if you're hacking the wwwlib source
code.

I hope this helps - if not, give me a shout.

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
Josh Watts  /  PretoryNet, Inc.
email: jwatts@pretorynet.com




> -----Original Message-----
> From: Bathal Raghavendra [mailto:raghu@adroit-tech.com]
> Sent: Monday, July 02, 2001 8:08 AM
> To: www-lib@w3.org
> Subject: libapp_1.obj : error LNK2001: unresolved external symbol
> _HTLibTerminate
> 
> 
> Hi All,
> I tried work with Libwww.
> 1) My machine is having windows 98.
> 2) I installed WinCVS1.2 from GNU
> 3) Installed LiteWebServer from www.gefionsoftware.
> 4) Did anonymous check out of all the files at
> http://www.w3.org/Library/cvs.html
> 5) .cvspass file exists in C:\
> 6) Getting Boot strapped...
>     a)INstalled perl from
> www.aspn.activestate.com/aspn/downloads/ActivePerl/
>       ran the perl command...
>     % cd libwww
>     % perl config/winConfigure.pl
>     but got the error message  'File Creation Failed'....
> 
>     b)Went to section "how to compile libwww for Windows. "
>     c) Downloaded the latest MSVC makefiles..and copied files to the
> corrending directory structure under Libwww folder.
>     d) ran perl command again and got the same error 
> message.'File Creation
> Failed'....
> 
> 
> 7) Now,,,statred  LiteWebServer
> 8) Using VC++, tried to run post.c... i got the message files 
> not found...SO
> I copied all header files to program files>>visual Studio >> 
> vc98>>includes.
>     So problem was over.
> 9) But i get some link problems.The i ran the simplest of programs
> libapp_1.c
> and this the error messages...
> --------------------Configuration: libapp_1 - Win32
> Debug--------------------
> Linking...
> libapp_1.obj : error LNK2001: unresolved external symbol 
> _HTLibTerminate
> libapp_1.obj : error LNK2001: unresolved external symbol _HTLibInit
> Debug/libapp_1.exe : fatal error LNK1120: 2 unresolved externals
> Error executing link.exe.
> 
> libapp_1.exe - 3 error(s), 0 warning(s)
> -------------------------------------------------
> What is the problem?
> Can any one help me on setting the system so that i can start 
> using the
> samples programs and...
> Tnx in advance,
> Cheers,
> Raghu
> 
> 
> 
> 
Received on Monday, 2 July 2001 08:48:01 GMT

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