views:

76

answers:

2

I am having trouble compiling wxwidgets with mingw on Windows 7 x64. It compiles for 30+ min, then runs out of memory. My computer has 6 GB of memory, so I don't know what is wrong.

Someone mentioned something about a 64 bit version of MinGW. Would this help, and if so, how would I use this?

I am able to compile just fine with Visual Studio.

Also, if I wish to use it with CodeBlocks, how do I add wxWidgets to CodeBlocks (I.e. link to it)?

A: 

I used MinGW 4.5, installed using the "MinGW GCC 4.5.0 Installer" from their site. To compile wxWidgets using MinGW, I used:

cd %WXDIR%\build\msw
mingw32-make -f makefile.gcc BUILD=debug RUNTIME_LIBS=static

In codeblocks there is a dialog for setting the path for MinGW. You set the path for wxWidgets in the new app wizard. I really recommend you set the same MinGW version you used to compile wxWidgets.

streeto
A: 

Actually, I somehow solved my own problem a few days ago, but forgot to note this up here.

I deleted the wxWidgets folder, reinstalled it, then compiled it according to the directions in a zip file here: http://dev.arqendra.net/#cbnb.

After you have installed wxWidgets, fire up msys, cd to the wxwidgets folder, then run

mingw32-make -f makefile.gcc BUILD=debug UNICODE=1

(Assuming mingw32-make is in your path).

Wait a while (maybe 20 minutes, depending on your computer's processing power).

Repeat this for release i.e.:

mingw32-make -f makefile.gcc BUILD=release UNICODE=1

Next, you have to deal with a quirk by copying \wxWidgets\include\wx\msw\setup.h to \wxWidgets\include\wx.

You can apply other options to your liking.

Also, to "add" wxWidgets to a project in C::B, you can just set up a wxWidgets project, saving you the trouble of adding the right directories (and .a libraries).

Biosci3c