SV: [xml] libxml2-2.5.7 on - additonal

Thanx!!! It finally works, big thanx!

Yes I understood, but I didn't know that That was the difference between
them. Now I do =)

This is worth both a beer and a coffey. Plenty of thanks for the quick
responses and a working solution!


Okey now, removed LIBCMT.LIB from the linker. Changed from /MT to /MD
and added /R_REENTRANT manually to the compiler args. I don't know
this means, and the built-in help that's usually good couldn't find
anything on it. Removed the R_ but still got no useful result. My
favourite online word translator couldn't translate it either. I guess
this is another fancy word that newbies shouldn't understand ;-)
Anyway, it's added now. There was no gui-thingie for it in the IDE
I could find.

The compiler args (/R_REENTRANT not shown):
/Og /Ob2 /Oi /Ot /Oy /G6 /GA /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D
/Fo"../Release/" /Fd"../Release/vc70.pdb" /W4 /nologo /c /Zi /Gz /TP

One small step for man, but one Big step for me =)
Soon this might work, yeah!

Oh, did I say /R_REENTRANT? I meant /D_REENTRANT. That defines a macro
'_REENTRANT', which is a good thing to do, because the code checks for
during the compilation and nothing will work good if it is not found :-)

That /Gz could be the problem with linking. It defaults the calling
convention to __stdcall, but libxml2 uses __cdecl. The difference is in
stack cleanup generated by the compiler. In __stdcall, the callee cleans
stack. In __cdecl, the caller does it. The good thing about __stdcall is
that the cleanup code is generated once per function, while in __cdecl
it is
generated once per call. The drawback is that __stdcall function must
fixed number of parameters. The C-runtime uses __cdecl, of course,
common functions such as printf accept variable number of parameters.

If you have no idea what am I talking about, you can as well use __cdecl
your program, you won't notice any difference. Try removing that /Gz
the command line and see if it links properly.


xml mailing list, project page
xml gnome org

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