$ cd "C:\Program Files\CodeBlocks\wxWidgets-2.8.12\build\msw"
username@username-PC /c/Program Files/CodeBlocks/wxWidgets-2.8.12/build/msw
$ make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1
if not exist gcc_mswudll mkdir gcc_mswudll
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
I had this problem too and it took months to fix as I couldn't get a straight answer. This is what I did in the end.
I would also set up MingW or if it's in CodeBlocks set up code::blocks in a simple directory path like C:\MinGW or C:\CodeBlocks\MinGW .
1 - set the 'Path' environmental varialbe to the bin folder in your mingw bin directory. (There are plenty of instructions on the web for this)
You will already see the 'Path' variable set to a few other directory paths. You simple add a ; to the end of them and paste in the MinGW bin folder path. eg in mine it was C:\CodeBlocks\MinGW\bin ... Thats it.
2 - Open the command prompt, change the directory to the wxWidgets directory. Put the wxWidgets directory somewhere like C:\wxWidgets, I believe if the path has spaces between the directory names then it can cause an issue. Not sure why so jut keep it simple.
Changing the directory is simple. In my case it was
cd C:\wxWidgets Thats it.
3 - enter the below two lines seperately. First build the debug version and then the release version. I've set Shared = 0 below as I don't want to use a dll. I gather you want to statically link your projects. The below works
******Thats it, now wxWidgets has been build you can start on creating a new project******
The steps below explain how to not get an error when doing that. The settings in Code::Blocks which is what I'm using correspond to the
Shared, Unicode, Monolithic settings above.
When you go to create a new project for the first time (if you are using Code::Blocks, the above settings will need to correspond to the settings in your project or you will keep getting errors.
eg.. in the WXWidgets library settings you tick wxWidgets is built as monolithic (because you have set Monolithic = 1 above)
Enable unicode (because you have set Unicode = 1 above)
Create and use a precompiled header (tick this)
I also ticked, 'Configure advanced options' and it works fine.
All other options should be unticked. That is 'Use wxWidgets DLL' because you set Shared = 0 above.
I realize this is not very technically worded but I'm trying to give you what I have done so you don't have to go through the months of hell to get this working that I did.
Hope this helps.
Username@USERNAME-PC /c/CodeBlocks/wxWidgets-2.8.12/build
$ mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 MONOLITHIC=1 BUILD=debug
sh: mingw32-make: command not found
Copied and pasted from the MSYS command line... did you want me to use make?
This is what I get when I used make:
USERNAME@Username-PC /c/CodeBlocks/wxWidgets-2.8.12/build
$ make -f makefile.gcc SHARED=0 UNICODE=1 MONOLITHIC=1 BUILD=debug
make: makefile.gcc: No such file or directory
make: *** No rule to make target `makefile.gcc'. Stop.
In Build/msw, mingw32-make acts as though I didn't type a word in. Using make returns the following, and switches into command prompt:
Username@USERNAME-PC /c/CodeBlocks/wxWidgets-2.8.12/build/msw
$ make -f makefile.gcc SHARED=0 UNICODE=1 MONOLITHIC=1 BUILD=debug
if not exist gcc_mswud mkdir gcc_mswud
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
Note that these actions are taken immediately after the command is entered.
It also fails to create the directory gcc_mswud... this is starting to become such an insufferable task.
wxwidgets does not need MSYS to build/link correctly in windows ! If you insist to use MSYS, then read about building wxwidgets in *nix environments using ./configure options (that's right !).
Then just run mingw32-make -f makefile.gcc from %WXWIN%\build\msw directory. You can edit config.gcc before doing this step. Make sure that bin directory of your directory is in %PATH%. (TDM installation setup this for you automatically)
No, not MSYS in this case. I understand why you might thing that considering 99.9% of people on any forum in the world will give you a command prompt to input and it will be for MSYS but nobody will even mention MSYS.
In this case it's just plain old Windows CMD promt.
Enter the full Debug and Release commands I've given you above.
Ah, that changes things. No one told me (after telling me to use MSYS) that I was supposed to use command prompt. I will start now.
C:\CodeBlocks\wxWidgets-2.8.12\build\msw>mingw32-make -f makefile.gcc SHARED=0 U
NICODE=1 MONOLITHIC=1 BUILD=debug
'mingw32-make' is not recognized as an internal or external command,
operable program or batch file.
Command prompt. It did the same in widgets\build.
EDIT1: I just noticed somthing: mingw32-make in my msw directory appears empty. I don't know why, but it is. 0kb. Could this have somthing to do with my problems? If so, where can i download it seperately?
In Build/msw, mingw32-make acts as though I didn't type a word in. Using make returns the following, and switches into command prompt:
Username@USERNAME-PC /c/CodeBlocks/wxWidgets-2.8.12/build/msw
$ make -f makefile.gcc SHARED=0 UNICODE=1 MONOLITHIC=1 BUILD=debug
if not exist gcc_mswud mkdir gcc_mswud
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
Can you check if that folder does exist? If it does delete everything in it and run the command again.
IIRC you using nuwen mingw ( http://nuwen.net/mingw.html )? If so, I dont think it has mingw-make (at least my copy doesn't) but does include make. At this point, if the previous suggestion didn't work, I'd suggest installing a fresh copy of both mingw (nuwen is using gcc-4.7.2 now) and wxWidgets.
MSYS is only needed if you want to build libraries that does not really have a windows port and can only be build by a ./configure script (neither wxwidgets or boost require MSYS).
And that's for version 1.47.0, but I have version 1.51.0. Are thos instructions good? I have already foung no folder named boost-jam-3.1.18-1-ntx86, so I want to make sure that these instructions can be used on the latest version.
Can you check the makefile.gcc in the msw folder. Is the first letter in uppper case such as Makefile.gcc as opposed to makefile.gcc . That will cause an error if the case is wrong.
Edit1: I just noticed somthing: There is a slash after each directory in environmental variables i didnt notice before, and didnt add to the end of mingw's. I will add that and try.
ok. I'm so fucking sick of these dumb instructions on how to "build" boost:
Ensure that Boost Jam is in the PATH environment variable (where <path> is the path you unpacked Boost Jam to):
set PATH=<path>\boost-jam-3.1.18-1-ntx86;%PATH%
Sorry to burst your bubble, but not even in version 1.47 is there any boost-jam-3.1.18-1-ntx86. I did a file search and you know what I found? NOTHING! Could someone please give me correct instructions (or link, or anything, just as long AS IT WORKS) before i punch a hole through my computer's screen. This is driving me crazy, and it's supposed to be the instructions to set this up with codeblocks. Obviously not. I downgraded just to follow the instructions and it still doesnt work. I even used my search program (searches every file and directory even hidden/locked, etc....) and didnt find it.