Cross compiling tests

Steven Edwards steven_ed4153 at
Sat Apr 12 11:31:54 CDT 2003

> Removing -L$(DLLDIR) from the Makefile also solves a conflict that
> arises from the fact that both MinGW and Wine have an implementation 
> of the C runtime:
> make crosstest
> i386-mingw32-gcc generated.cross.o testlist.cross.o -o urlmon_crosstest.exe -L../../../dlls 
> -lurlmon -lm
> ../../../dlls/libmsvcrt.a(ds00443.o)(.text+0x0): multiple definition of `atexit'
> first defined here
> ../../../dlls/libmsvcrt.a(ds00319.o)(.text+0x0): multiple definition of `_onexit'
> first defined here

Yes this is a known bug. Mingw includes its own C exit code. I have been meaning to email them
about this.

> i386-mingw32-gcc dsound.cross.o testlist.cross.o -o dsound_crosstest.exe  -ldsound -luser32
> -lkernel32 -lm
> dsound.cross.o(.text+0x1656): In function `dsenum_callback':
> /usr/local/src/wine-cvs/wine/dlls/dsound/tests/dsound.c:403: undefined reference to
> `wine_dbgstr_guid'
> dsound.cross.o(.text+0x24dd): In function `dscenum_callback':
> /usr/local/src/wine-cvs/wine/dlls/dsound/tests/dsound.c:649: undefined reference to
> `wine_dbgstr_guid'
> make: *** [dsound_crosstest.exe] Error 1
> The wine_ prefix suggests that this is a Wine internal function, so 
> it will never be avaliable on Windows/MinGW. Can these be removed?
> Or is there an alternative that works on all platforms? This is the
> other one that fails:

No this builds fine on Mingw for Windows if you import libwine. Is there something wrong with your
workaround. You still need to link to the files in wine/lib.

> i386-mingw32-gcc safearray.cross.o vartest.cross.o testlist.cross.o -o oleaut32_crosstest.exe 
> -loleaut32 -lm
> safearray.cross.o(.text+0x1496): In function `func_safearray':
> /usr/local/src/wine-cvs/wine/dlls/oleaut32/tests/safearray.c:277: undefined reference to
> `IID_IUnknown'
> undefined reference to `IID_IUnknown'
> undefined reference to `IID_IDispatch'
> undefined reference to `IID_IDispatch'
> make: *** [oleaut32_crosstest.exe] Error 1
> Same problem I guess. Any suggestion as to how this one might be fixed
> is welcome.

I think this is the same thing. The static and dynamic libraries in wine/lib are still needed in
some cases even if you use the w32api package and not wines import libs.


Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more

More information about the wine-devel mailing list