Re: [xml] xmlDocDump() on Windows
- From: Rob Richards <rrichards ctindustries net>
- To: Daniel Corbe <daniel junkmail gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] xmlDocDump() on Windows
- Date: Thu, 13 Sep 2007 18:34:42 -0400
Hi Daniel,
Daniel Corbe wrote:
Rob,
I've tried building my app on both debug and release, and the same
thing happens. You're saying there may be something wrong with my
build environment? I'm not entirely convinced of that but I won't
rule it out as a possibility.
Yes. You need to either compile libxml2 in statically or make sure that
your app is using the same run-time (/MD since you are using a
downloaded one).
I'm running Visual C++ Express 2005 (which is basically VC8, if you
actually paid for a copy)
Microsoft Windows 2003 Server R2 Platform SDK
I have built and tested your example using both VC8 (Vista and XP) and
VC6 (XP), but you have the additional wildcard in there which I haven't
tried yet (I believe the libxml2 libs you are using are linked to
msvcrt.dll). I build my own dlls so things here have a common
environment. Just an FYI so you don't think I am blowing smoke here, but
I do get the access violation (within the fwrite call) to occur when i
compile the executable with a different runtime setting than the libxml2
dll.
When you call fopen, it creates the file pointer from msvcrt8.dll
(because you are using VS 2005), while fwrite is being called from the
msvcrt.dll. So even if you are using the same runtime flags, it is
probably an issue from the different run time dlls. I will test that
tomorrow to confirm.
If you are going to distribute the app, I would suggest that you either
use alternative functions that do not require a FILE pointer passed in
(unless you are getting it was already created from within the libxml2
dll), or build and distribute with your own libxml2.dll, or compile in
the libxml2 functionality statically. Those are the only way you are
going to be able to guarantee there is no issue there.
<snip />
I cut out the rest because what I meant about a HEAP issue is that it
most like was an access issue due to run time problems and not a
specific problem in code.
Rob
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]