Hello all,
maybe I'm just missing the obvious, but I can't get my small one-file app to link. As I've just built Wine from scratch on this box, everything should be installed, including libGL... in /usr/lib32:
mah@piccard:~/Wine Apps/GPWiki Framework$ make i586-mingw32msvc-g++ -pipe -mwindows \ -L/usr/local/lib/wine -L/lib32 -L/usr/lib32 \ -Wl,-rpath,/usr/local/lib/wine -Wl,-rpath,/lib32 -Wl,-rpath,/usr/ lib32 \ -lopengl32 -lglu32 -o OpenGLBase.exe OpenGLBase.cpp /tmp/cclajgrA.o:OpenGLBase.cpp:(.text+0x10e): undefined reference to `_wglCreateContext@4' /tmp/cclajgrA.o:OpenGLBase.cpp:(.text+0x134): undefined reference to `_wglMakeCurrent@8' /tmp/cclajgrA.o:OpenGLBase.cpp:(.text+0x15d): undefined reference to `_glClearColor@16' /tmp/cclajgrA.o:OpenGLBase.cpp:(.text+0x16a): undefined reference to `_glClear@4' collect2: ld returned 1 exit status make: *** [OpenGLBase.exe] Fehler 1 mah@piccard:~/Wine Apps/GPWiki Framework$ for F in /lib32/* /usr/ lib32/* /usr/local/lib/wine/*; do if nm "$F" 2>/dev/null | grep glClearColor; then echo "$F"; fi; done U glClearColor 000621c0 T wine_glClearColor 000522f0 t wine_glClearColorIiEXT 00052240 t wine_glClearColorIuiEXT /usr/local/lib/wine/opengl32.dll.so 00102574 B glClearColor /usr/local/lib/wine/wined3d.dll.so mah@piccard:~/Wine Apps/GPWiki Framework$
Short of solid knowledge I tried about anything I could imagine, but no joy. Any ideas, somebody?
Thanks, MarKus
- - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/
On Wednesday 16 July 2008 03:38:37 pm Markus Hitter wrote:
maybe I'm just missing the obvious, but I can't get my small one-file app to link. As I've just built Wine from scratch on this box, everything should be installed, including libGL... in /usr/lib32:
Try linking with MinGW's libs, not Wine's. Not sure if MinGW even understand ELF libs..
Am 17.07.2008 um 00:56 schrieb Chris Robinson:
On Wednesday 16 July 2008 03:38:37 pm Markus Hitter wrote:
maybe I'm just missing the obvious, but I can't get my small one-file app to link. As I've just built Wine from scratch on this box, everything should be installed, including libGL... in /usr/lib32:
Try linking with MinGW's libs, not Wine's.
My understanding is, MinGW dosn't come with libs, but uses the native (Windows) ones.
Not sure if MinGW even understand ELF libs..
If I comment out the non-linkable lines, the apps runs under Wine and MessageBoxes pop up.
MarKus
- - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/
On Thursday 17 July 2008 01:43:26 am Markus Hitter wrote:
Am 17.07.2008 um 00:56 schrieb Chris Robinson:
Try linking with MinGW's libs, not Wine's.
My understanding is, MinGW dosn't come with libs, but uses the native (Windows) ones.
The cross-compiler comes with win32 import/static libs. Since MinGW is a Windows port of GCC (and the cross-compiler is basically a port back), the libs it comes with are native Windows. The -L switches, however, point the compiler to Wine's ELF libs, which the native .exe it produces doesn't understand.
Otherwise, you can probably use winegcc and make a winelib app, which can use Wine's libs (but then won't run on Windows).
If I comment out the non-linkable lines, the apps runs under Wine and MessageBoxes pop up.
What MessageBoxes?
I guess I'll have to set up a virtual machine running the real thing. There are so many levels of abstraction (64-bit Ubuntu -> 32-bit app, Linux environment -> Windows libraries, Linux build platform -> Windows binaries), making my setup pretty fragile.
64-bit Linux should run 32-bit Windows binaries fine with Wine. OpenGL apps, too. Of course you'll need the 32-bit Linux libs installed for Wine to use, however.
Am 17.07.2008 um 11:21 schrieb Chris Robinson:
The cross-compiler comes with win32 import/static libs. Since MinGW is a Windows port of GCC (and the cross-compiler is basically a port back), the libs it comes with are native Windows. The -L switches, however, point the compiler to Wine's ELF libs, which the native .exe it produces doesn't understand.
This makes sense. Thanks for the explanation.
I guess I'll have to set up a virtual machine running the real thing. There are so many levels of abstraction (64-bit Ubuntu -> 32-bit app, Linux environment -> Windows libraries, Linux build platform -> Windows binaries), making my setup pretty fragile.
64-bit Linux should run 32-bit Windows binaries fine with Wine. OpenGL apps, too. Of course you'll need the 32-bit Linux libs installed for Wine to use, however.
I'm hunting for a few of the differences between "should" and "does" and try to catch them with test cases. See bug #10490.
MarKus
- - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/
-lopengl32 -lglu32 -o OpenGLBase.exe OpenGLBase.cpp /tmp/cclajgrA.o:OpenGLBase.cpp:(.text+0x10e): undefined reference to `_wglCreateContext@4'
I think this is in gdi32.dll
Am 17.07.2008 um 01:04 schrieb Stefan Dösinger:
-lopengl32 -lglu32 -o OpenGLBase.exe OpenGLBase.cpp /tmp/cclajgrA.o:OpenGLBase.cpp:(.text+0x10e): undefined reference to `_wglCreateContext@4'
I think this is in gdi32.dll
Thanks for the suggestion. Tried to add them, but it doesn't make a difference.
I guess I'll have to set up a virtual machine running the real thing. There are so many levels of abstraction (64-bit Ubuntu -> 32-bit app, Linux environment -> Windows libraries, Linux build platform -> Windows binaries), making my setup pretty fragile.
MarKus
- - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/