MSVC Portability

Zoltán Sólyom z-ismeretlen at freemail.hu
Fri Apr 5 12:27:31 EDT 2013


Daniel was right and glib really had to be recompiled. Not only because 
libpurple used a different msvc runtime, but it was also difficult to 
figure out what other things were going wrong without debugging glib.
Anyone trying to do the same must have both a debug and a release 
version of glib. If libpurple uses the debug msvc DLL for calling fread 
and fwrite, but glib uses the release DLL for _wfopen (in g_fopen), file 
handles won't work. The ms runtime keeps a static array of valid file 
handles, and if different DLLs are loaded, those are two separate 
arrays. It uses one for the debug and a different one for the release 
DLL to check if a handle is valid.

The .NET + CLR + whatever mix I wrote now connects to jabber. I think 
the MSVC portability is "solved", at least for now.

I want to upload the VS2012 project file somewhere with instructions, 
and also start "open-sourcing" the program right away. I will make a new 
project for the program in my existing SourceForge account. But I don't 
know whether I should put the libpurple stuff there too, or if there's a 
better place for it. What do you think?




More information about the Devel mailing list