Re: [xml] Questions about libxml as a DLL on win32.



Perfect! :-)

I changed /MT to /MD and it works as you say.  I'll figure out how this
maps over to the borland world and post results here.

Thanks a lot,

Steven



-----Original Message-----
Well, then I guess we can't agree on this.  Here's a makefile for
MSVC that shows the same results as the makefile for borland.

get ready to agree

Makefile.msvc
-------------
#
# This is the unix build version of the makefile for SolitanLib
###############################################################

CC=cl.exe
OHEXT=obj

CFLAGS=/W3 /MT /O2 /GX /D "WIN32" /D "NDEBUG" \
    /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" \
    /FD
LFLAGS=

You are compiling main.c and dllfunctions.c and staticly linking both to the
c runtime.  this means that each there is a free() function in testdll.exe
and dllfunctions.dll.  that is the cause of your problem.

change the /MT compiler flag to /MD.

Or, for more proof, use add the following line to both main.c and
dllfunctions.c

printf("I am using free 0x%08X\n",free)

you will see that testdll.exe is using a different copy of free as
dllfunctions.c,  that is your problem.

It is not a win32 "dll boundary" issue.

_______________________________________________
xml mailing list
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml

-- 
==================================================================
== Steven M. Cherry                            smc cherrys org  ==
==                 http://family.cherrys.org/steven/index.html  ==
==================================================================




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