wxWidgets unter Windows OpenGL Linker Problem



  • Hi,

    ich versuche gerade verzweifelt die opengl samples zu kompilieren, leider meckert der Linker immer und ich bin aber der Meinung das alle Libs drinne sind die da sein müssten. Kann wer helfen? Ich habe wxwidgets selbst kompiliert als static unicode release mit use_opengl und habe auch vorher in der setup.h das define wxUSE_GLCANVAS auf 1 gesetzt.

    D:\dev\wxWidgets-2.8.11-static\samples\opengl>mingw32-make.exe -f makefile.gcc U
    NICODE=1 USE_OPENGL=1 BUILD=release
    mingw32-make.exe -C cube -f makefile.gcc LINK_DLL_FLAGS="-shared" LINK_MODULE_FL
    AGS="-shared" CC="gcc" CXX="g++" CFLAGS="" CXXFLAGS="" CPPFLAGS="" LDFLAGS="" CP
    P="gcc -E" SHARED="0" WXUNIV="0" UNICODE="1" MSLU="0" BUILD="release" DEBUG_INFO
    ="default" DEBUG_FLAG="default" MONOLITHIC="0" USE_GUI="1" USE_HTML="1" USE_MEDI
    A="1" USE_XRC="1" USE_AUI="1" USE_RICHTEXT="1" USE_OPENGL="1" USE_ODBC="0" USE_Q
    A="0" USE_EXCEPTIONS="1" USE_RTTI="1" USE_THREADS="1" USE_CAIRO="0" USE_GDIPLUS=
    "0" OFFICIAL_BUILD="0" VENDOR="custom" WX_FLAVOUR="" WX_LIB_FLAVOUR="" CFG="" CP
    PUNIT_CFLAGS="" CPPUNIT_LIBS="" RUNTIME_LIBS="dynamic" GCC_VERSION="3" all
    mingw32-make.exe[1]: Entering directory `D:/dev/wxWidgets-2.8.11-static/samples/
    opengl/cube'
    g++ -c -o gcc_mswu\cube_cube.o  -O2 -mthreads  -DHAVE_W32API_H -D__WXMSW__   -DN
    DEBUG    -D_UNICODE   -I.\..\..\..\lib\gcc_lib\mswu -I.\..\..\..\include  -W -Wa
    ll -I.  -I.\..\..\..\samples -DNOPCH   -Wno-ctor-dtor-privacy   -MTgcc_mswu\cube
    _cube.o -MFgcc_mswu\cube_cube.o.d -MD -MP cube.cpp
    windres --use-temp-file -icube.rc -ogcc_mswu\cube_cube_rc.o    --define __WXMSW_
    _   --define NDEBUG    --define _UNICODE   --include-dir .\..\..\..\lib\gcc_lib\
    mswu --include-dir ./../../../include  --include-dir .  --include-dir ./../../..
    /samples --define NOPCH
    g++ -o gcc_mswu\cube.exe gcc_mswu\cube_cube.o gcc_mswu\cube_cube_rc.o   -mthread
    s -L.\..\..\..\lib\gcc_lib -Wl,--subsystem,windows -mwindows    -lwxmsw28u_gl -l
    opengl32 -lglu32 -lwxmsw28u_core  -lwxbase28u   -lwxtiff -lwxjpeg -lwxpng  -lwxz
    lib  -lwxregexu -lwxexpat     -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool
    -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwso
    ck32 -lodbc32
    gcc_mswu\cube_cube.o:cube.cpp:(.text+0x1a9): undefined reference to `wxGLCanvas:
    :OnSize(wxSizeEvent&)'
    gcc_mswu\cube_cube.o:cube.cpp:(.text+0x1d4): undefined reference to `wxGLCanvas:
    :SetCurrent()'
    gcc_mswu\cube_cube.o:cube.cpp:(.text+0x230): undefined reference to `wxGLCanvas:
    :~wxGLCanvas()'
    gcc_mswu\cube_cube.o:cube.cpp:(.text+0x1ced): undefined reference to `wxGLCanvas
    ::wxGLCanvas(wxWindow*, wxGLCanvas const*, int, wxPoint const&, wxSize const&, l
    ong, wxString const&, int*, wxPalette const&)'
    gcc_mswu\cube_cube.o:cube.cpp:(.text+0x1d7f): undefined reference to `wxGLCanvas
    ::wxGLCanvas(wxWindow*, wxGLContext const*, int, wxPoint const&, wxSize const&,
    long, wxString const&, int*, wxPalette const&)'
    gcc_mswu\cube_cube.o:cube.cpp:(.text+0x1dc7): undefined reference to `wxGLCanvas
    ::SetCurrent()'
    gcc_mswu\cube_cube.o:cube.cpp:(.text+0x1f22): undefined reference to `wxGLCanvas
    ::SetCurrent()'
    gcc_mswu\cube_cube.o:cube.cpp:(.text+0x233d): undefined reference to `wxGLCanvas
    ::SwapBuffers()'
    gcc_mswu\cube_cube.o:cube.cpp:(.text+0x2516): undefined reference to `wxGLCanvas
    ::SetCurrent()'
    gcc_mswu\cube_cube.o:cube.cpp:(.text+0x215): undefined reference to `wxGLCanvas:
    :~wxGLCanvas()'
    gcc_mswu\cube_cube.o:cube.cpp:(.rdata+0x30c): undefined reference to `wxGLCanvas
    ::sm_eventTable'
    gcc_mswu\cube_cube.o:cube.cpp:(.rdata$_ZTV12TestGLCanvas[vtable for TestGLCanvas
    ]+0x8): undefined reference to `wxGLCanvas::GetClassInfo() const'
    collect2: ld returned 1 exit status
    mingw32-make.exe[1]: *** [gcc_mswu\cube.exe] Error 1
    mingw32-make.exe[1]: Leaving directory `D:/dev/wxWidgets-2.8.11-static/samples/o
    pengl/cube'
    mingw32-make.exe: *** [cube] Error 2
    


  • Das Problem hat sich erledigt. Ich habe wxWidgets nochmals mit MinGW und MSys kompiliert und jetzt funktionieren auch die OpenGL Samples.


Log in to reply