Author Topic: Using CB minGW pkg: - Can u compile wxWidgets from C::B GUI ?  (Read 3525 times)

Offline Mel_3

  • Multiple posting newcomer
  • *
  • Posts: 15
Status:
- I downloaded & installed the C::B minGW package onto a Win XP Pro PC.
- I can compile simple C & C++ console apps.

Goal:
- I want to download wxWidgets & learn how to compile it
- So I can use it with C::B & wxSmith

Details:
- The instructions "Compiling wxWidgets 2.8.6 to develop Code::Blocks" at...
http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)

- Show using minGW from the Command Line.

- The Code::Blocks minGW package installed into c:\program files\codeblocks
- and directory c:\program files\codeblocks\MinGW

- I can run mingw-make -v from c:\program files\codeblocks\MinGW\bin

The Question:
- Shouldn't you be able to compile wxWidgets using Code::Blocks GUI
- OR must you compile it from the command line as shown in the above referenced instructions?

Finally, does anyone know if using the SET command at the Command Line
SET PATH=<MINGW>\bin;<MINGW>\mingw32\bin
changes the Windows Environment Variables?
Does it 'append'  to the Environment Variable at My Computer | Properties | Advanced | Environment Variables?
or what?

(I've already wiped out the "Path" Environment Variable in System Variables once
 and had to do a Restore to get things back as they should be... groan.)

I really appreciate the help getting this going Guys, so thanks in advance for any help.

PS maybe I should post this over at the wxWidgets forum but since I'm trying to do this so it will allow wxSmith in C::B to work... I thought this would be the more appropriate place.
« Last Edit: March 13, 2012, 02:12:59 am by Mel_3 »

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
- Shouldn't you be aboe to compile wxWidgets using Code::Blocks GUI
- OR must you compile it from the command line as shown in the above referenced instructions?
If you have a project file, you can use the GUI ;).  A while back I wrote one, which works fine for me (on Windows).  (Be warned that the shared multi-lib configuration failed to build on my computer - however, as I always use monolithic, I have not bothered to fix it.)

Finally, does anyone know if using the SET command at the Command Line
SET PATH=<MINGW>\bin;<MINGW>\mingw32\bin
changes the Windows Environment Variables?
Does it 'append'  to the Environment Variable at My Computer | Properties | Advanced | Environment Variables?
or what?

(I've already wiped out the "Path" Environment Variable in System Variables once
 and had to do a Restore to get things back as they should be... groan.)
Using a command like set path=<MinGW>\bin (or alternatively path <MinGW>\bin) only makes a temporary change (localized to that cmd.exe window, and any programs it spawns).  Although, I would suggest you ensure to add it to the current path (instead of replacing the path with it) by doing something of the following:
path <MinGW>\bin;%path%

PS maybe I should post this over at the wxWidgets forum but since I'm trying to do this so it will allow wxSmith in C::B to work... I thought this would be the more appropriate place.
How-to-compile-wxWidgets questions are probably belong there.

Offline Mel_3

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Using CB minGW pkg: - Can u compile wxWidgets from C::B GUI ?
« Reply #2 on: March 13, 2012, 02:26:40 am »
Alpha, Thanks for the quick response.

I've decided to do the compile via the batch file supplied in the other thread... as opposed to doing it via C::B.

You said: "Using a command like set path=<MinGW>\bin (or alternatively path <MinGW>\bin) only makes a temporary change (localized to that cmd.exe window, and any programs it spawns)."

So I understand this to mean set path=<MinGW>\bin will NOT change the "Path" as viewed via...
Right Click My Computer | Click Properties | Advanced | Environment Variables
and looking at the System Variable "Path" and it's associated Value...
Right?

And, you can bet I'll be sure and set a Restore Point before I start fooling with Environment Variables again :)

Thanks again.


Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Using CB minGW pkg: - Can u compile wxWidgets from C::B GUI ?
« Reply #3 on: March 13, 2012, 03:34:18 am »
So I understand this to mean set path=<MinGW>\bin will NOT change the "Path" as viewed via...
Right Click My Computer | Click Properties | Advanced | Environment Variables
and looking at the System Variable "Path" and it's associated Value...
Right?
Correct.

By the way, to avoid the potential problem mentioned in your other thread, get rid of the copy of MinGW that was bundled with 10.05 release of Code::Blocks - it is quite old now - and install a newer TDM build of MinGW.
(From http://forums.codeblocks.org/index.php/topic,15283.0.html)
The TDM release of GCC 4.6.1 is now available for download. As always, I've tested it on wxWidgets (2.8.12) and Code::Blocks SVN (7458) to ensure good compatibility. You can build Code::Blocks with either the TDM32 edition ("out of the box"), or the TDM64 edition (using the MinGW-w64 project's runtime and the "-m32" flag for 32-bit compilation). Since GCC incorporates the "-fno-keep-inline-dllexport" flag beginning with the 4.6 series, you will probably need to use this flag when building wxWidgets as a MONOLITHIC dll (mingw32-make ... CXXFLAGS="-fno-keep-inline-dllexport").
Beware that you will need to add CXXFLAGS="-fno-keep-inline-dllexport" to your make command if you update your compiler.