Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: BMB on October 07, 2007, 12:49:36 pm

Title: wxWidgets Samples
Post by: BMB on October 07, 2007, 12:49:36 pm
How can I load the wxWidgets samples or demos into C::B? They seem to be made only for MSVC++. And how can I compile them? I'm using C::B with MinGW, but have almost no experience.
Thnx
Title: Re: wxWidgets Samples
Post by: thomas on October 07, 2007, 09:10:28 pm
wxWidgets does not support Code::Blocks, thus you have only the following two choices:
1. import the MSVC project
2. add the sources to a new project by hand

If you decide to go (1) then please do note that the MSVC importer is not perfect, in particular it often misses the required link libraries... you'll have to look over it by hand.
Title: Re: wxWidgets Samples
Post by: Jeisson on October 10, 2007, 08:16:28 pm
I think it would be valuable to try build a wx-ready C::B release, in a similar fashion to wxDevC++. C::B is more versatile than wxDevC++, but people who try to start in wx developing finds naturally abstruse the installation process. I am one of them, and I am still starting in this splendid evironment.

I think if wxWidgets team included CB projects files for each example, moreover, a CB project for compiling all the library, it would be fabulous!.

These are only ideas, I know they requires a lot of effort to be accomplished.
Thanks, thanks for this laudable work!
Title: Re: wxWidgets Samples
Post by: MortenMacFly on October 11, 2007, 02:28:09 pm
1. import the MSVC project
I tried that with the wx libs one time... and ended up very frustrated and without results. Anyway - I agree it's not impossible and would be *GREAT*! But it's not easy to do...
Title: Re: wxWidgets Samples
Post by: hd on October 12, 2007, 12:46:09 am
Hi,

I prepared a project file for wx-minimal. You may get it from http://www.dynaset.org/dogusanh/download/wxminimal-cb.zip (2Kb).

It has relase, debug, dll targets for mingw, bcc, dmc, vc8 compilers.
Targets named as:
rgc - gcc release
dgc - gcc debug
rvc - vc release
rgcl - gcc release dll etc.

Temporary files created at cb/.orgc etc.
Binaries created at cb/bin.

To use it copy project file to samples/minimal directory.

Hope it helps.

--
Regards,
Hakki Dogusan
Title: Re: wxWidgets Samples
Post by: alb_cb_moon on August 06, 2008, 07:17:22 pm
I know that this is a old post but I have the same problem. I try to download the Hakki's sample archive but the link are death, someone have a copy of it?
Title: Re: wxWidgets Samples
Post by: alb_cb_moon on August 11, 2008, 05:24:52 pm
Finally I can download the archive but it don't work , whem I try to compile
show the error

Code
Compiling: ..\sample.rc
C:\project\WXWIDG~1.8\samples\sample.rc:31:24: wx/msw/wx.rc: No such file or directory
windres.exe: preprocessing failed.
Process terminated with status 1 (0 minutes, 0 seconds)
2 errors, 0 warnings

I try a lot but I can't fixed it, then I create a empty project, add the archives minimal.cpp and sample.rc
copy the same options of a wxWidgets project created by the wizard, but without
the option '-include wx_pch.h', I use the build targets of wxminimal-cb.zip for
the gcc compiler and it works...
Title: Re: wxWidgets Samples
Post by: hd on August 13, 2008, 11:49:12 am
Hi,

(wx2.8.8, mingw-3.4.5)

I'm glad you found your way to compile it.

Seeing your unsuccessfull try, I tried to use my project file. As you, I too failed :( Believe me it was working at that time..

There are two differences/problems:
- Project file was for ANSI build
  - Compiler settings-#defines: Added wxUSE_UNICODE
  - Linker settings: Changed wxmsw28 to wxmsw28u, wxregex to wxregexu
- It seems cb misses to add (Search directories-Resource compiler) resource include directories to windres command. I removed minimal.rc from project.

ps. I'm not using other compilers now, so didn't check them.

--
Regards,
Hakki Dogusan