extern char **environ and msvc
Stefan Dösinger
stefandoesinger at gmx.at
Wed May 25 15:52:53 CDT 2011
Hi,
This is one of the last remaining hacks needed to compile the d3d parts of
Wine with Visual Studio. Our definition of **environ is conflicting with one
already in the Windows SDK headers:
1>..\..\wine\libs\wine\loader.c(54): warning C4273: '_environ': Inkonsistente
DLL-Bindung.
1> C:\Program Files\Microsoft Visual Studio
10.0\VC\include\stdlib.h(299): Siehe vorherige Definition von '_environ'
I'm sorry for the German, I don't know how to change this. Google finds only
other clueless people. Either way it says something like "Inconsistent DLL
binding"
The line in stdlib.h declares _environ as
_CRTIMP extern char ** _environ; /* pointer to environment table */
The compiler just writes a warning, but afterwards linking fails:
1>loader.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__environ".
The linker complains about an "unresolved external symbol __environ". Removing
our declaration of environ fixes the warning, link error and libwine seems to
work OK.
I don't know what the proper fix is, please advise. Maybe this code shouldn't
be compiled at all? I don't think I need the loader code on Windows.
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libwine-msvc-hack.patch
Type: text/x-patch
Size: 634 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20110525/2db04287/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20110525/2db04287/attachment.pgp>
More information about the wine-devel
mailing list