Author Topic: Can't compile wxWidgets app  (Read 5057 times)

Offline Frog

  • Single posting newcomer
  • *
  • Posts: 3
Can't compile wxWidgets app
« on: December 26, 2008, 12:16:42 pm »
Dear all!
I am just a beginner, and I have a problem with wxPack.
I am using CodeBlocks v. 8.02, minGW v. 3.81, wxPack 2.8.8.04 all installed on C:, OS - XP sp3
Then I try to compile barebone wxWidgets project from CodeBlocks wizard, or any samples from wxPack it starts and proceed without
any errors - at some point empty .exe file appears in the Debug/Release bin folder, stays there for a few seconds, then disappear, and
few seconds after that - compilation stops - no errors shown. I tried different settings for global variables, compiler and linker options,
but the result is always the same. No .exe file, and no errors. Can You, please, help me and point what's wrong ? Thank You for the attention.   

P.S. Regular Win32 apps are compiling normally, and produce .exe as they should.
« Last Edit: December 26, 2008, 12:30:37 pm by Frog »

Offline alb_cb_moon

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: Can't compile wxWidgets app
« Reply #1 on: December 26, 2008, 10:09:12 pm »
I am NOT using wxPack, but I believe that the error is the Mingw version, because wxPack's autor say in the homepage section that the package only is compiled for MinGW Gcc4.2.1.
OS: Windows XP SP2
GUI Library: wxWidgets 2.8.10
IDE: CodeBlocks SVN / Nigth Builds Compiler: MinGW & gcc 3.4.5

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Can't compile wxWidgets app
« Reply #2 on: December 27, 2008, 07:13:07 am »
I'm using the SVN version of codeblocks in windows xp.
and I'm using the mingw from http://www.tdragon.net/recentgcc/
And using wxWidgets 2.8.9 library compiled myself. In another computer, I'm using wxpack. They all work OK!
See the screencast of a sample test
http://sites.google.com/site/studycodeblocks/Home/wx.swf
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7592
    • My Best Post
Re: Can't compile wxWidgets app
« Reply #3 on: December 27, 2008, 08:12:40 am »
I have found that for more than Hello world tests, wxpack works better using MultiLib setting instead of Monolithic Lib.
Tim S
 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Can't compile wxWidgets app
« Reply #4 on: December 27, 2008, 08:27:18 am »
Thanks for your hint.
As a beginner of codeblocks and wxWidgets, I'm not sure to determine which libraries should be linked to a specific wxwidgets project. So as a simple way, I use monolithic library to let things work easy.

If I was an expert like you :D, maybe it is better to use "MultiLib setting instead of Monolithic Lib"
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Frog

  • Single posting newcomer
  • *
  • Posts: 3
Re: Can't compile wxWidgets app
« Reply #5 on: December 27, 2008, 09:49:03 pm »
Thank You All for Your help and attention! I tend to agree with alb_cb_moon that ,most likely, the cause of trouble is incorrect version of MinGW. I've successfully compiled any configuration of wxWidgets Application in VC++ Studio 2005, installed on the same computer, with the same wxPack. I will move to higher version of MinGW - try, and report the results to you.

Offline Frog

  • Single posting newcomer
  • *
  • Posts: 3
Re: Can't compile wxWidgets app
« Reply #6 on: December 30, 2008, 07:00:13 am »
Ah, minGW v. 3.81 is a current version, it didn't cause the problem. The problem was in my configuration options. wxWidgets project wizard has somehow misleading statement "Please select the location of wxWidgets folder this is top-level folder ... blah-blah-blah... must contain 'include' and 'libs' subfolders" - so I set the path. But it must contain $(#wx) instead -  and compilation will proceed normally. Special Thanks to ollydbg for screencast tutorial.  :) I can compile wxWidgets app now  :D Thank You!