Ok, finally I have compiled the project. All libraries should be added separatly Problems are solved, but I had one more adventure with linking.
I started new project in the Code::Blocks and then added libraries, and the compile log looked like below:
Project : wxWidgets application
Compiler : GNU GCC Compiler (called directly)
Directory : C:\Dev-Cpp\Projects\4\
--------------------------------------------------------------------------------
Switching to target: default
mingw32-g++.exe -pipe -mthreads -fno-pcc-struct-return -fno-rtti -fno-exceptions -D_X86_ -DWIN32 -D_WIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -DSTRICT -D__WXMSW__ -D__WINDOWS__ -Wall -I"C:\Program Files\CodeBlocks\include" -IC:\Dev-Cpp\include -c main.cpp -o .objs\main.o
mingw32-g++.exe -pipe -mthreads -fno-pcc-struct-return -fno-rtti -fno-exceptions -D_X86_ -DWIN32 -D_WIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -DSTRICT -D__WXMSW__ -D__WINDOWS__ -Wall -I"C:\Program Files\CodeBlocks\include" -IC:\Dev-Cpp\include -c app.cpp -o .objs\app.o
mingw32-g++.exe -L"C:\Program Files\CodeBlocks\lib" -LC:\Dev-Cpp\lib -o C:\Dev-Cpp\Projects\4\wxWidgets.exe .objs\main.o .objs\app.o -lwxmsw -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lwsock32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid -lwxmsw26 -lwxmsw26_gl -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregex -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32 -lopengl32 -mwindows
C:\Program Files\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 37 seconds)
0 errors, 0 warnings
Strange is that I didn't added all libraries from the log
-lwxmsw -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lwsock32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid -lwxmsw26 -lwxmsw26_gl -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregex -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32 -lopengl32
A added only libraries below:
-lwxmsw26 -lwxmsw26_gl -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregex -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32 -lopengl32
So I removed all libraries I added in the linker options, and the compile log looks like below:
Project : wxWidgets application
Compiler : GNU GCC Compiler (called directly)
Directory : C:\Dev-Cpp\Projects\4\
--------------------------------------------------------------------------------
Switching to target: default
mingw32-g++.exe -pipe -mthreads -fno-pcc-struct-return -fno-rtti -fno-exceptions -D_X86_ -DWIN32 -D_WIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -DSTRICT -D__WXMSW__ -D__WINDOWS__ -Wall -I"C:\Program Files\CodeBlocks\include" -IC:\Dev-Cpp\include -c main.cpp -o .objs\main.o
mingw32-g++.exe -pipe -mthreads -fno-pcc-struct-return -fno-rtti -fno-exceptions -D_X86_ -DWIN32 -D_WIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -DSTRICT -D__WXMSW__ -D__WINDOWS__ -Wall -I"C:\Program Files\CodeBlocks\include" -IC:\Dev-Cpp\include -c app.cpp -o .objs\app.o
mingw32-g++.exe -L"C:\Program Files\CodeBlocks\lib" -LC:\Dev-Cpp\lib -o C:\Dev-Cpp\Projects\4\wxWidgets.exe .objs\main.o .objs\app.o -lwxmsw -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lwsock32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid -mwindows
C:\Program Files\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 34 seconds)
0 errors, 0 warnings
I was confused, why code::blocks adds libraries by it self, and I remind my self, that there I had problems with starting new static wxWidgets project, there was no file wxwindows_static.cbm file, and someone on the forum sad that these who have the problem should copy this file from the url:
http://cvs.sourceforge.net/viewcvs.py/*checkout*/codeblocks/codeblocks/src/templates/win32/wxwidgets_static.cbp?rev=1.1
and save it in the code::blocks directory, and I found that these libraries are in this file
<Linker>
<Add library="wxmsw"/>
<Add library="winspool"/>
<Add library="winmm"/>
<Add library="shell32"/>
<Add library="comctl32"/>
<Add library="ctl3d32"/>
<Add library="odbc32"/>
<Add library="advapi32"/>
<Add library="wsock32"/>
<Add library="opengl32"/>
<Add library="glu32"/>
<Add library="ole32"/>
<Add library="oleaut32"/>
<Add library="uuid"/>
</Linker>
So if anyone has the same problem, just removed these lines from the wxwindows_static.cbp file. Thank you for the help.