Windows binaries

Lubomir I. Ivanov neolit123 at
Sun Nov 27 06:24:07 PST 2011

----- Original Message ----- 
From: "Dirk Hohndel" <dirk at>

> Oops - I thought I had a warning free build. Missed that one.
> BTW: I didn't get a warning for the LPCTSTR casts. If you are using
> mingw as well (shouldn't matter that I'm using it to cross build and you
> are using it natively), then I wonder why you see warnings that I don't
> see.

some of these might be compiler version specific. i will send a patch today for 

subsurface only builds with versions newer to mingw-gcc-4.6 on my side. i've 
tried version prior to 4.6 previously but got a linker error (i don't exactly 
recall the cause), but it is mingw bug.

RegQueryValueEx and RegSetValueEx take a LPCTSTR parameter, but when i enable 
UNICODE (-DUNICODE) the TEXT macro expands to something wrong e.g. "error: 
'Lname' undeclared" - where the L prefix is for wide char string, but it only 
works on string literals e.g. TEXT("sometext") =  L"sometext"

thats why in the patch i've only used casting. e.g.:
RegQueryValueEx(hkey, (LPCTSTR)name,....

> I'd rather have this in one Makefile that just works everywhere. We
> already do some manual magic for libdivecomputer, I don't think it would
> be all that hard to do have a conditional section that sets up the other
> libraries.

ok, i will give it a try and propose changes to the makefile.
i'm sure it will work.

>> if a zip "" is also provided then it has to match the
>> versions in "". e.g. i have "libxml2.dll" and
>> "pthreadGC1.dll"
> Not sure how to deal with that - in the subsurface.nsi file we need the
> exact versions that we link against. Is there a tool like ldd on Windows
> that we could use to create the output? All I found is DependencyWalker
> and that's not a native tool, either (and not opensource, either, so we
> can't distribute it).

yep, there is no LDD from msys/mingw/gnuwin.
there are only some closed source tools like "dependency walker".

but apparently one can do:

objdump -pt libgtk-win32-2.0-0.dll | grep DLL

DLL Name: libgdk-win32-2.0-0.dll
DLL Name: libatk-1.0-0.dll
DLL Name: libcairo-2.dll

i will try to match the versions in the eventual "src" package to the crossbuild 
DLL versions.
that are in the windows installer.


More information about the subsurface mailing list