User forums > Help

Static linking problem - wxWidgets

<< < (2/2)

stahta01:
Did you try the -lwxmsw28u after -lwxmsw28u_gl because order of libraries matter?

I am guessing wxmsw28u should be after wxmsw28u_gl.

Did the error go away? Did it change?

WARNING: You must not mix DLL and Static search folders for the same libraries
-IC:\wxWidgets-2.8.8\lib\gcc_dll\mswu

The search -IC:\wxWidgets-2.8.8\lib\gcc_dll\mswu will result in the wrong setup.h being found which can cause all sorts of errors.

FYI: IMO, The linker errors you are getting is caused by wxmsw28u not being in the right spot in the library list.

Tim S

siegfried:
ok,so now we have:

--- Code: ---mingw32-g++.exe -O2   -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE   
-IC:\wxWidgets-2.8.8\lib\gcc_lib\mswu -IC:\wxWidgets-2.8.8\include -IC:\wxWidgets-2.8.8\contrib\include
-IC:\wxWidgets-2.8.8\lib\gcc_lib\mswu -IC:\glut-3.7.6-bin  -c "C:\C projects\dungeon_editor\dungeon_editorApp.cpp"
-o obj\Release_static\dungeon_editorApp.o
mingw32-g++.exe -O2   -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE   
-IC:\wxWidgets-2.8.8\lib\gcc_lib\mswu -IC:\wxWidgets-2.8.8\include -IC:\wxWidgets-2.8.8\contrib\include
-IC:\wxWidgets-2.8.8\lib\gcc_lib\mswu -IC:\glut-3.7.6-bin  -c "C:\C projects\dungeon_editor\dungeon_editorMain.cpp"
-o obj\Release_static\dungeon_editorMain.o

mingw32-g++.exe -O2   -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE   
-IC:\wxWidgets-2.8.8\lib\gcc_lib\mswu -IC:\wxWidgets-2.8.8\include -IC:\wxWidgets-2.8.8\contrib\include
-IC:\wxWidgets-2.8.8\lib\gcc_lib\mswu -IC:\glut-3.7.6-bin  -c "C:\C projects\dungeon_editor\mapTile.cpp"
-o obj\Release_static\mapTile.o
windres.exe -i C:\CPROJE~1\DUNGEO~2\resource.rc -J rc -o obj\Release_static\resource.res -O coff
-IC:\wxWidgets-2.8.8\lib\gcc_lib\mswu -IC:\wxWidgets-2.8.8\include -IC:\MinGW\include
mingw32-g++.exe -O2   -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE   
-IC:\wxWidgets-2.8.8\lib\gcc_lib\mswu -IC:\wxWidgets-2.8.8\include -IC:\wxWidgets-2.8.8\contrib\include
-IC:\wxWidgets-2.8.8\lib\gcc_lib\mswu -IC:\glut-3.7.6-bin  -c "C:\C projects\dungeon_editor\NewSetDialog.cpp"
-o obj\Release_static\NewSetDialog.o
mingw32-g++.exe -o bin\Release_static\dungeon_editor.exe -LC:\wxWidgets-2.8.8\lib\gcc_lib
-LC:\wxWidgets-2.8.8\lib\gcc_lib -LC:\MinGW\lib  obj\Release_static\dungeon_editorApp.o
obj\Release_static\dungeon_editorMain.o obj\Release_static\mapTile.o obj\Release_static\NewSetDialog.o 
obj\Release_static\resource.res  -lwxmsw28u_gl -lwxmsw28u -lwxpng -lwxjpeg -lwxtiff -lwxzlib  -s   -mwindows


--- End code ---

I changed order of libraries and I kicked out the DLL search path. By the way: I thought wxms28u and wxms28u_gl are the same- second is with gl enabled - but obviously I was wrong: one is 18mb, second 800 bytes ;)

ONE SECOND!
Now I am getting different set of linking errors - obviously wx errors are gone and now it's standard set of ole etc.

I think you are Programming God, Tim ;)

stahta01:
I am off to college class; wish you look on the new errors.

Tim S

siegfried:
ok it works now.
Thank you for you help, Tim.



Navigation

[0] Message Index

[*] Previous page

Go to full version