Windows 7 Home 32 bit. I configured CodeBlocks and wxWidgets according to the instructions in 1_Installation Instructions.docx. The minimal.exe program was created from command line and was runed normal. I tried to make a frame based project according to 2_Create_Minimal.cpp_In_CodeBlocks.docx. There were a lot of mistakes. Here is a piece from the error message:
C:\wxWidgets-3.1.3\lib\gcc_lib/libwxmsw31ud_core.a(corelib_window.o): In function `ZN8wxWindow16MSWHandleMessageEPljjl':
c:\wxWidgets-3.1.3\build\msw/../../src/msw/window.cpp:3568: undefined reference to `IID_IAccessible'
c:\wxWidgets-3.1.3\build\msw/../../src/msw/window.cpp:3568: undefined reference to `LresultFromObject@12'
c:\wxWidgets-3.1.3\build\msw/../../src/msw/window.cpp:3769: undefined reference to `GetThemeBackgroundContentRect@24'
c:\wxWidgets-3.1.3\build\msw/../../src/msw/window.cpp:3818: undefined reference to `GetThemeBackgroundContentRect@24'
c:\wxWidgets-3.1.3\build\msw/../../src/msw/window.cpp:3839: undefined reference to `IsThemeBackgroundPartiallyTransparent@12'
c:\wxWidgets-3.1.3\build\msw/../../src/msw/window.cpp:3841: undefined reference to `DrawThemeParentBackground@12'
...........................
What am I doing wrong?
Error creating project in CodeBlocks
Error creating project in CodeBlocks
- Attachments
-
- FrameBuilder.zip
- (6.42 KiB) Downloaded 69 times
Re: Error creating project in CodeBlocks
Add libraries uxtheme and oleacc to the linker settings where you have other windows system libraries.
Re: Error creating project in CodeBlocks
Thank you very much, everything worked out. I added libraries libuxtheme.a liboleacc.a libwxjpeg.a libwxtiff.a in Project's build option in Linker settings. For the future I would like to know, how can I find out what other library I need to add from the error message?
Re: Error creating project in CodeBlocks
For wxWidgets, a documentation for a class always has a "Library: " section where you can see which library the class belongs to. In the wxWidgets library scheme you can see which library depends on which. The image format libraries are not listed there, just notice that some of them require wxzlib library.
Please notice that with MinGW, the order you list the libraries to link with matters: if library A depends on library B, library B needs to be listed first.
For system Windows libraries, the best and fastest way may be just to google the error message. But you probably have all you need listed already.
Please notice that with MinGW, the order you list the libraries to link with matters: if library A depends on library B, library B needs to be listed first.
For system Windows libraries, the best and fastest way may be just to google the error message. But you probably have all you need listed already.
Re: Error creating project in CodeBlocks
Thanks for the answer. I understood.