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
From f495ac10b47d899702c1b91a8a66f042d8df71dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <ste...@codeweavers.com> Date: Fri, 30 Jul 2010 06:31:40 +0200 Subject: [PATCH 1/4] libwine: msvc hack --- libs/wine/loader.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libs/wine/loader.c b/libs/wine/loader.c index df0a6b5..ad0ce61 100644 --- a/libs/wine/loader.c +++ b/libs/wine/loader.c @@ -50,7 +50,7 @@ #define environ (*_NSGetEnviron()) #include <CoreFoundation/CoreFoundation.h> #include <pthread.h> -#else +#elif !defined(_MSC_VER) extern char **environ; #endif -- 1.7.3.4
signature.asc
Description: This is a digitally signed message part.