when I click click on project -> new project -> wxWidgets and select a directory to store the project in I get and Error Message wxWidgets.cbp does not exist. I click okay and I get an error message saying it failed to copy wxwidgets_static.cbp to wxwidgets.cbp error 2: the system cannot find the specified file.
then no project is created.
I checked the path the directory called templates where C::B is looking and sure enough the file does not exist.
I did a clean install and it is a windows XP pro machine running service pack 2
Hmmm apparently this is a problem when copying the files.
a) In what directory is your Codeblocks installed?
b) In what directory are you trying to create the project?
I never had this problem so I can't tell you much but if you were working on a few other programes befor ethe wxwidget one you might have move it on accident. If so have you tryed doing a search for it with the search tool. Also Try checking the recycle bin, if where cleaning something out in the dir where it was stored you might have exdently dellete it also. I would personaily use the dynamic one tho since you already have codeblock useing it why not you apllications and worry about the static latter.
It is a clean install. I have not triend to do anything with it or moved anything. I let C::B install into its default directory under program files. I tried to create the project in a directory in my documents. I did search the machine and the file it is looking for was not found.
I ran the previous version on a different computer to code wxWidgets programs and never had this problem. It is only with the latest version that I run into this error.
Please give us the full paths (both the project's intended path, and the codeblocks path), for reference.
What you 're saying is that this file somehow isn't part of the install?
I 'll check the setup file and report back.
Yiannis.
There is no this file in setup of c::b w/out mingw
Full contents of template directory is following:
C:\devel\codeblocks\share\CodeBlocks\templates>dir
Volume in drive C is WINXP-SYS
Volume Serial Number is 3827-0EE5
Directory of C:\devel\codeblocks\share\CodeBlocks\templates
20.05.2005 20:59 <DIR> .
20.05.2005 20:59 <DIR> ..
25.04.2005 14:55 707 console.cbp
25.04.2005 15:06 2 104 console.png
25.04.2005 14:55 493 console.template
25.04.2005 14:55 101 console-main-c.cpp
25.04.2005 14:55 97 console-main-cpp.cpp
25.04.2005 15:07 1 638 gui.png
25.04.2005 14:55 876 dll-main.cpp
25.04.2005 14:55 594 staticlib.cbp
25.04.2005 14:55 367 staticlib.template
25.04.2005 14:55 800 staticlib-sample.c
25.04.2005 14:55 505 dll.cbp
25.04.2005 15:06 2 566 dll.png
25.04.2005 14:55 347 dll.template
10.05.2005 20:23 512 opengl.cbp
25.04.2005 15:07 1 470 opengl.png
25.04.2005 14:55 434 opengl.template
25.04.2005 14:55 4 408 opengl-main.cpp
25.04.2005 14:55 2 244 sdl-main.cpp
25.04.2005 15:10 1 074 sdl.png
25.04.2005 14:55 735 sdlapp.cbp
25.04.2005 14:55 414 sdlapp.template
25.04.2005 15:06 126 058 sdl-cb.bmp
25.04.2005 14:55 454 win32.cbp
25.04.2005 14:55 425 win32gui.template
25.04.2005 14:55 3 596 win32-main.cpp
26.04.2005 16:15 197 wx-app-ash.cpp
25.04.2005 14:55 254 wx-app-ash.h
26.04.2005 16:15 915 wx-main-ash.cpp
25.04.2005 14:55 304 wx-main-ash.h
26.04.2005 16:15 1 491 wx-main-s.cpp
26.04.2005 16:15 1 075 wx-main-sh.cpp
25.04.2005 14:55 489 wx-main-sh.h
19.03.2005 12:08 912 wxwindows.cbp
09.05.2004 14:51 218 wxwindows.png
19.04.2005 19:46 1 066 wxwindows.template
35 File(s) 159 940 bytes
2 Dir(s) 2 426 048 512 bytes free
C:\devel\codeblocks\share\CodeBlocks\templates>
Yiannis,
Yes, I am saying that the file was not part of the install. Perhaps it is included but it has a different name?
Yiannis: Remember I added this file *just* after beta7 got out? Perhaps you forgot to update your script to include this particular file... dunno.
Quote from: rickg22Yiannis: Remember I added this file *just* after beta7 got out? Perhaps you forgot to update your script to include this particular file... dunno.
Yes, I checked the setup files and they 're both wrong as far as templates are concerned (they still provide the older templates) :oops:
Sorry guys, I 'll make it up to you in the next release...
Yiannis.
Hey why not release a "templates update pack"? :D
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
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.
QuoteI 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?
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
I 'll do it this weekend.
Yiannis.
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
To make the dll option work you need the wxwidgets "compiled for dll linking". You'd need to follow the instructions at the wiki.
Hi
Also, there seems no easy way to rename the default program and include file names. So I found it quite annoying especially when I create a wxwidget project using the option "Use separate wxApp, wxFrame files" which create 4 files whose name I have to change. Is there any plan to add a rename feature in the coming release ?
Also, when a main.cpp or main.h exist, C::B will allows me to create source files with new names. But the extension will then become .cxx & .hxx. This seems not quite consistent. What do you think ?
C Major
I originated this thread and had resigned to waiting for the next release, but I am glad that someone put the template up. Thanks! thanks! thanks!
Quote from: rickg22To make the dll option work you need the wxwidgets "compiled for dll linking". You'd need to follow the instructions at the wiki.
I see. In fact I have downloaded wxwidgets 2.6. But I haven't compile it (to a lib*.a nor *.dll) for use. I am still using the wxwidgets 2.4 devpak for DevCpp which provides only the libwxmsw.a for "Static". But since there is already a wxmsw242.dll in C:\Program Files\Codeblocks after C::B installation, so I thought I can make use of it to write programs that use the DLL.
C Major
QuoteBut since there is already a wxmsw242.dll in C:\Program Files\Codeblocks after C::B installation, so I thought I can make use of it to write programs that use the DLL.
You would need the accompanying .a library to use it...
Yiannis.
Hi
I don't know if this is of any use to anyone, bt this is the template that i use
for wxWidgets 2.6.1 multilib (release) build. enjoy
<?xml version="1.0"?>
<!DOCTYPE Code::Blocks_project_file>
<Code::Blocks_project_file>
<FileVersion major="1" minor="1"/>
<Project>
<Option title="wxWidgets application"/>
<Option makefile="Makefile"/>
<Build>
<Target title="default">
<Option type="0"/>
</Target>
</Build>
<Compiler>
<Add option="-pipe"/>
<Add option="-mthreads"/>
<Add option="-fno-pcc-struct-return"/>
<Add option="-fno-rtti"/>
<Add option="-fno-exceptions"/>
<Add option="-D_X86_"/>
<Add option="-DWIN32"/>
<Add option="-D_WIN32"/>
<Add option="-DWINVER=0x0400"/>
<Add option="-D__WIN95__"/>
<Add option="-D__GNUWIN32__"/>
<Add option="-D__WIN32__"/>
<Add option="-DSTRICT"/>
<Add option="-D__WXMSW__"/>
<Add option="-D__WINDOWS__"/>
</Compiler>
<Linker>
<Add library="libwxmsw26_core.a"/>
<Add library="libwxbase26.a"/>
<Add library="libwxmsw26_adv.a"/>
<Add library="libwxbase26_net.a"/>
<Add library="libwxbase26_xml.a"/>
<Add library="libwxmsw26_html.a"/>
<Add library="libwxmsw26_media.a"/>
<Add library="libwxmsw26_xrc.a"/>
<Add library="libwxexpat.a"/>
<Add library="libwxjpeg.a"/>
<Add library="libwxpng.a"/>
<Add library="libwxregex.a"/>
<Add library="libwxtiff.a"/>
<Add library="libwxzlib.a"/>
<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>
</Project>
</Code::Blocks_project_file>
This liborder has worked for me so far, so i think that it is ok.