Re: [xml] Help Required

Thanks Coleman for explaining what is happening in the background with
the DLL and lib file. I wasn't aware that both lib and dll file is
created at the same time. I will place the dll file in the same
directory as the application exe file. 

So to sum up, I must load the libraries in the Object/library modules
section and call the functions normally. I will certainly give this a
try and see if I am successful at it.

What is the reason then for having the DLL available when running the
application? Surely all you need is just the lib to do the function

Just to explain what we currently do:

We have a DLL that is used by third party vendors to provide information
on quotes. The DLL is written so that it is platform independent. Now
source of the application uses libxml2.lib, zlib.lib and iconv.lib to
read xml files and to return information using xml with the resultant

We compile the source code which ends up as a DLL which then is
distributed to the various third parties. My question is then; when
running your own application using the Quoter.dll why are we not using
the DLL's for the lib files mention above? How does this work in the

Much appreciated. Thanks again

Best Regards


-----Original Message-----
From: Coleman Brumley [mailto:coleman brumley comcast net] 
Sent: 01 March 2007 04:17
To: Xen Cloete
Cc: Tim Van Holder; xml gnome org
Subject: Re: [xml] Help Required

Xen Cloete wrote:
I assume you mean Visual C++ 6.0, not one of the newer .NET ones.
Yip that's correct. VC++ 6.00. 

Forgive me for asking the obvious: did you add libxml2.lib to the
"Object/library modules" field of the Link tab of the Project
Yip it certainly has been added. See my setting with the reply to
No, it isn't.  Below is your setting copied from your other posting.  I 
snipped the irrelevant stuff. libxml2.lib isn't there.

Link Tab:
Object/library modules:

My understanding of the .lib files is that these files are not the same
as .dll files. To read .dll files you would obviously use the
LoadLibrary and GetProc... functions to load into memory and then
these functions. 

That's not true. When something is compiled a a DLL, it also produces a 
lib file. That lib file can be included in your linker setting, and 
there is no need to do LoadLibrary and GetProc jazz. Just call the 
functions as you normally would. Make sure the .DLL file is somewhere 
the .exe can find it though. You CAN use LoadLibrary, etc. You just 
don't HAVE to.

Static lib files are different from .DLL files.  You just link with the 
.lib file at compile time.  You don't need LoadLibrary, etc. in this 
case either.  Just call the functions. 
The "resource file section" sounds like the wrong place to add a
library. Similarly, the location of libxml2's headers should be in
"Additional include directories" field of the Preprocessor section of
the C/C++ tab, not the "Additional resource include directories"
of the Resources tab.

You are probably correct. However let me throw a spanner in the works.
have the production application setup this way. This was done by
previous C/C++ developer. And this works. I have setup everything the
same as the production applications settings. But no luck!!
This is certainly not the normal way of linking with a library at 
compile time. 

"Hollard is a licensed Financial Services Provider (FSP) as defined in the Financial Advisory and 
Intermediary Services Act (FAIS). FAIS requires that anyone who makes any recommendation, guidance or 
proposal of a financial nature must be a duly authorised representative of a licensed FSP. If you are seeking 
financial advice, or if you feel that this email constitutes financial advice, or if the author of this email 
wants you to purchase, amend or cancel a policy, please check with the author that he/she is a registered 
representative of Hollard." 
This email and all content are subject to the following disclaimer:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]