Compiling winelib dependant code with g++
Gaudet Michael-MGAU01
MGAU01 at freescale.com
Thu Aug 25 10:32:02 CDT 2005
wineg++ is using g++, and is passing its options to g++.
How can I link some winelib-dependant code with g++ ?
compilation is okay, but at linking time, all wine functions are unresolved.
// ### here's the output :###
[root at udp015809uds Wine2]# g++ -lwine registry.o registry_wrap.o -o registry.out
registry.o(.text+0x2e): In function `CreateKey(char const*)':
: undefined reference to `RegCreateKeyA'
registry.o(.text+0x58): In function `CreateKey(char const*)':
: undefined reference to `RegQueryValueExA'
registry.o(.text+0x8f): In function `CreateKey(char const*)':
: undefined reference to `RegQueryValueExA'
registry.o(.text+0xa5): In function `CreateKey(char const*)':
: undefined reference to `MessageBoxA'
collect2: ld returned 1 exit status
// ### And the same code compiled with wineg++ ###
[root at udp015809uds Wine2]# wineg++ -lwine registry.o registry_wrap.o -o registry.out
// program runs okay.
For information, I need to use g++ in order to assimilate wine lib framework to SWIG, to generate Win32 wrappers in C# for mono.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-devel/attachments/20050825/5294d49f/attachment.html
More information about the wine-devel
mailing list