User forums > Help
Problem creating a wxWidgets project
rickg22:
Hey why not release a "templates update pack"? :D
c_major:
Hi,
I am a new comer of C::B. I has the Dev-Cpp installed with wxwidgets 2.4.2 devpak. But it always crashed on my win98 when I tried to debug and so I give up after struggled for 2 weeks. So far, I found C::B quite stable. The most important, it does not crash my win98 during debug.
But concerning developing wxwidgets appllication, when I select "Using static wxWidgets library" to start a project, I got the same error as Guest. According to Yiannis, this part is missed from the current setup file. So I turned to select "Using wxWidgets DLL". But this time I got this while linking:
"C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw242"
I have checked my folders and found:
C:\Dev-Cpp\lib\libwxmsw.a
and
C:\Program Files\CodeBlocks\wxmsw242.dll
I supposed that libwxmsw.a only applicable for "Using static wxWidgets library" and wxmsw242.dll is for "Using wxWidgets DLL".
But why ld cannot find wxmsw242.dll. How to make it work?
Besides, does it has anything to do with wxwindows.template ?
Pls advise.
C Major :D
rickg22:
C Major: There was a problem in the latest release, the wxwidgets_static.cbp was NOT included. However, you can find it at:
http://cvs.sourceforge.net/viewcvs.py/*checkout*/codeblocks/codeblocks/src/templates/win32/wxwidgets_static.cbp?rev=1.1
Mandrav, mind releasing the wxwidgets templates? We still have a lot of bugs to fix before 1.0-final, and releasing the missing templates at sourceforge (just a zip file) would help a lot of newcomers :)
Update: I added a sticky thread in the troubleshootings forum saying where to find this file.
mandrav:
--- Quote ---I have checked my folders and found:
C:\Dev-Cpp\lib\libwxmsw.a
and
C:\Program Files\CodeBlocks\wxmsw242.dll
I supposed that libwxmsw.a only applicable for "Using static wxWidgets library" and wxmsw242.dll is for "Using wxWidgets DLL".
But why ld cannot find wxmsw242.dll. How to make it work?
--- End quote ---
Depends on how you build/installed wxwidgets. Possibly, you just have to change the wxmsw242 library in project build options to wxmsw (as libwxmsw.a)
--- Quote ---
Mandrav, mind releasing the wxwidgets templates? We still have a lot of bugs to fix before 1.0-final, and releasing the missing templates at sourceforge (just a zip file) would help a lot of newcomers
--- End quote ---
I 'll do it this weekend.
Yiannis.
Anonymous:
Rick,
Thanks for your template. I have downloaded it and have built some testing programs. It's working fine now for projects "Using static wxWidgets library".
But concerning projects for "using wxWidgets DLL" ...
Yiannis,
In fact, I did not build the wxWidgets. I just installed the devpak for DevCpp and thus have got the libwxmsw.a. If I change the wxmsw242 to wxmsw, I still got a lot or errors while linking:
mingw32-g++.exe -LC:\Dev-Cpp\lib -o C:\Hack\wx\wxDLL01.exe .objs\wxDLL01.o -lwxmsw -mwindows
C:\Dev-Cpp\lib/libwxmsw.a(app.o)(.text+0x12ee):app.cpp: multiple definition of `WinMain@16'
.objs\wxDLL01.o(.text+0x4a):C:/Hack/wx/wxDLL01.cxx:40: first defined here
.objs\wxDLL01.o(.text+0x19): In function `ZNK7wxFrame12GetClassInfoEv':
C:/Dev-Cpp/include/wx/window.h: undefined reference to `_imp___ZN9wxAppBase17CheckBuildOptionsERK14wxBuildOptions'
.objs\wxDLL01.o(.text+0x42): In function `Z8wxGetAppv':
C:/Hack/wx/wxDLL01.cxx:40: undefined reference to `_imp__wxTheApp'
.objs\wxDLL01.o(.text+0x74): In function `WinMain':
C:/Hack/wx/wxDLL01.cxx:40: undefined reference to `_imp___Z7wxEntryPvS_Pcib'
...
...
Although I will continue my work with the "wxWindows_static" option, I just curious on how to make the "DLL" option works. Besides, what is the use of the wxmsw242.dll found in C:\Program Files\CodeBlocks ? Pls advise. Thanks.
C Major
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version