Ok, I've installed WxWidgets 2.8 and Code::Blocks 10.05 with WxSmith plugin and have some problems with compiling programs or rather creating new projects.
1. I select new WxWidget project.
2. Select WxWidgets version 2.8
3. Select WxSmith gui builder and Application type: Dialog based
4. Select correct WxWidgets location
5. Select debug and release build, dll library version, no Miscellaneus options, no additional libraries.
6. Project gets created with example dialog and text "Welcome to WxWidgets", great.
7. Click "build" - FAIL -
Compiling: resource.rc
Linking executable: bin\Debug\ex_test.exe
(...)./libmingw32.a(main.o):main.c:(.text+0xd2): undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 2 seconds)
1 errors, 0 warnings
Not so strage because all source files are all empty (all created cpp and h files are empty). There is something wrong with wizard, or it's normal??
Learn to post in the correct forum in the future.
Please continue this post in this thread; in time a admin will move it to the proper forum.
Note: You are not as likely to get help in this forum so you will need to wait more for help.
Turn on Full Compiler Logging and post the rebuild log
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
This will help to confirm if the compiler setup is a cause or not.
What OS and its version are you using?
Did you Compile wxWidgets or install wxPack?
Tim S.
Sorry for posting in wrong forum.
This is log for build command:
windres.exe -i J:\Dropbox\projekty\test\resource.rc -J rc -o obj\Debug\resource.res -O coff -IG:\MinGW\wxWidgets\wxWidgets2.8\include -IG:\MinGW\wxWidgets\wxWidgets2.8\lib\gcc_dll\mswd -IG:\MinGW\bin
mingw32-g++.exe -LG:\MinGW\wxWidgets\wxWidgets2.8\lib\gcc_dll -LG:\MinGW\bin -o bin\Debug\test.exe obj\Debug\resource.res -mthreads -lwxmsw28d -mwindows
G:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../libmingw32.a(main.o):main.c:(.text+0xd2): undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 2 seconds)
1 errors, 0 warnings
Windows XP Pro SP3
I used wxPack_v2.8.11.03.exe
G:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../libmingw32.a(main.o):main.c:(.text+0xd2): undefined reference to `WinMain@16'
The above shows that you were using MinGW 3.4.5 version of the Compiler; or you have you compiler completely damaged.
Tim S.
Yes, but I've reinstalled mingw, wxWidgets and Code::Blocks to newer versions after your posts and the result is the same.
-------------- Build: Debug in test ---------------
mingw32-g++.exe -LG:\MinGW-4\wxWidgets\wxWidgets2.8\lib\gcc_dll -LG:\MinGW-4\bin -o bin\Debug\test.exe obj\Debug\resource.res -mthreads -lwxmsw28d -mwindows
g:/mingw-4/bin/../lib/gcc/mingw32/4.5.0/../../../libmingw32.a(main.o):main.c:(.text+0xd2): undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 3 seconds)
1 errors, 0 warnings