Author Topic: wxWidgets Samples  (Read 14540 times)

BMB

  • Guest
wxWidgets Samples
« 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

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: wxWidgets Samples
« Reply #1 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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Jeisson

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: wxWidgets Samples
« Reply #2 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!

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: wxWidgets Samples
« Reply #3 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...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline hd

  • Multiple posting newcomer
  • *
  • Posts: 45
    • http://www.dynaset.org/dogusanh
Re: wxWidgets Samples
« Reply #4 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

Offline alb_cb_moon

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: wxWidgets Samples
« Reply #5 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?
OS: Windows XP SP2
GUI Library: wxWidgets 2.8.10
IDE: CodeBlocks SVN / Nigth Builds Compiler: MinGW & gcc 3.4.5

Offline alb_cb_moon

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: wxWidgets Samples
« Reply #6 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...
OS: Windows XP SP2
GUI Library: wxWidgets 2.8.10
IDE: CodeBlocks SVN / Nigth Builds Compiler: MinGW & gcc 3.4.5

Offline hd

  • Multiple posting newcomer
  • *
  • Posts: 45
    • http://www.dynaset.org/dogusanh
Re: wxWidgets Samples
« Reply #7 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