Building wxWidgets with MinGW

Pages: 1234
ok, boost is built. I will run a test program.

It could not find the header files...
I just noticed a new folder named after Codeblocks program folder. It contains all of the boost headers, etc....

Should I copy these to my program's folder? I am reluctant to do so without an answer because it is so much data.
(is that folder under codeblocks for boost 1.43 by chance - because I have such a directory there with boost files and I don't remember putting it there)


As for the build we have just done - I took the easy option - I left things as is and just added the search paths to CodeBlocks as follows:

(As my boost 1.47 stuff is at D:\Programming\boost_1_47_0)

Settings->Compiler and Debugger->Search Directories and on the compiler tab added D:\Programming\boost_1_47_0

and on the linker tab added D:\Programming\boost_1_47_0\stage\lib

You get the picture.
Last edited on
the new codeblocks folder:

C:\CodeBlocks (just like the program folder)

Actual program's folder: C:\programmingtools\CodeBlocks

So, no.
ok, so I ran a program I made before this whole re-vamp that searches directories. It compiled with my old version, so it should compile with this one. these are the errors I get upon compilation:

||=== search directory algorithm, Release ===|
ld.exe||cannot find -lboost_filesystem|
ld.exe||cannot find -lboost_system|
||=== Build finished: 2 errors, 0 warnings ===|


It can't find the libraries! :0
Is there a library called boost_filesystem??
have a look at the libraries you just built and see how they are named.
See also this (down the page - section 6.3 - the bit about library naming)
http://www.boost.org/doc/libs/1_35_0/more/getting_started/windows.html

In the test prog (which also used boost file system incidentally)
the libraries names I used (for a debug build) were
boost_filesystem-mgw46-d-1_47 and
boost_system-mgw46-d-1_47


( I assume your lib search path is correct)

HTH
uh.... no. boost_system and boost_filesystem....

Is there anyway I can keep it like that?

and it still returns the same error:

ld.exe||cannot find -lboost_filesystem-mgw46-d-1_47|
ld.exe||cannot find -lboost_system-mgw46-d-1_47|
||=== Build finished: 2 errors, 0 warnings ===|


the lib path:

Compiler search path: C:\programmingtools\boost\boost_1_47_0
Linker search path: C:\programmingtools\boost\boost_1_47_0\stage\lib

I assume the new libraries (the built libraries) are under the 'boost' folder, and not our new 'codeblocks' folder.
Last edited on
I have to include

libboost_system-mgw44-mt-d-1_47 (boost_system)
libboost_filesystem-mgw44-mt-d-1_47 (boost_filesystem)

and then it tells me it can';t find the FRAQKING DLL... BOOST Y U NO FREAKING WORK?! I'm about to rip my hair out.........Why do we even have to built the libraries anyway, can't they just be built and downloaded in the form of headers and .dlls?

It would save a lot of trouble...

it keeps compiling a 43-44kb program that is too small to be the program I wrote! And when I run it outside of Code::Blocks, it prompts a pop-up that says it can't find the .dll to the library. It isn't compiling my program correctly and I dont understand why.
Last edited on
You do know that windows starts a program that needs a DLL - it only look in certain places for DLLs - mainly - the directory the program was located in and c:\windows\system32

With regard to downloading just headers and dlls - you can do that - I applaud your persistence in trying to do it from source.
Personnaly I think you proabaly learnt a lot from it.

There is a way to downlaod the prebuild windows binaries - it
is called boost pro - but it is for Microsoft toolchain (*.lib).
I don't know of any prebuilt libraries for mingw/gcc toolchain.

ok, look: I only have been doing this because I want wxWidgets because I want to start making GUIs for my programs.

Are you telling me I need to copy all the dlls in the new 'codeblocks' folder to system32??
I think I will go back to nuwen's distro... so much easier. If you think it is possible to install wxWidgets with his distro, please post with a link. I guess I will start GUI in college...
I was able to build wx statically using these instructions http://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW using nuwen mingw gcc version 4.7.2
I'll try to summarize what I did...
1. I ran
C:\MinGW\open_distro_window.bat
which sets up the mingw environment.
2. Change to msw directory
cd C:\wxWidgets-2.8.12\lib\gcc_lib\mswu\wx\msw

3. Clean any previously built files
mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1 SHARED=0 MONOLITHIC=1 clean

4. Build
mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1 SHARED=0 MONOLITHIC=1


After the build the dll's libs (.a) are in
C:\wxWidgets-2.8.12\lib\gcc_lib


I haven't tested linking to them yet, but you will most likely need to add their location to Code::Blocks library path.

Edit: I should also note I was also able to build with gcc 4.6.1 using these steps.
Last edited on
Topic archived. No new replies allowed.
Pages: 1234