-
February 4th, 2011, 11:38 PM
#1
Building Boost for Mingw
I was hoping somebody could help me, because I'm having a heck of a time. I've recently become more involved with cross-platform programming, so I have switch from MSVC to Mingw so I can use the same compiler in Windows as I do Linux (gcc 4.5.2).
My problem is that Mingw doesn't search for includes and libs in the right directories by default. I either have to use an IDE or manually specify with -IC:\MinGW\include\ flags from the command line. However, when I try to execute bjam, there is no way to tell it where to search for these files (that I know of) so bjam fails to compile anything.
Help would be appreciated.
-
February 5th, 2011, 12:51 AM
#2
Re: Building Boost for Mingw
Originally Posted by Chris_F
Help would be appreciated.
Maybe you don't have to build Boost. Most libraries are headers only.
-
February 5th, 2011, 01:31 AM
#3
Re: Building Boost for Mingw
Originally Posted by nuzzle
Maybe you don't have to build Boost. Most libraries are headers only.
I'm mostly interested in boost::thread.
-
February 5th, 2011, 01:40 AM
#4
Re: Building Boost for Mingw
Originally Posted by Chris_F
My problem is that Mingw doesn't search for includes and libs in the right directories by default. I either have to use an IDE or manually specify with -IC:\MinGW\include\ flags from the command line.
That's weird. I mean, yes, you have to specify include directories if they are not in the compiler's include directory, but if they are, it should be found by default.
-
February 5th, 2011, 02:28 AM
#5
Re: Building Boost for Mingw
Originally Posted by Chris_F
I'm mostly interested in boost::thread.
Well, it needs building but note that there will be multithreading in the upcoming C++ standard and most compilers have introduced parts of it so maybe <thread> is available in gcc already.
-
February 5th, 2011, 02:34 AM
#6
Re: Building Boost for Mingw
Originally Posted by nuzzle
Well, it needs building but note that there will be multithreading in the upcoming C++ standard and most compilers have introduced parts of it so maybe <thread> is available in gcc already.
Again, a problem with Mingw. I have tested std::thread in GCC and think it works great, but for some reason I can't get it to work in Mingw. I have a feeling it's not supported yet.
-
February 5th, 2011, 04:25 AM
#7
Re: Building Boost for Mingw
What is the version of the MinGW port of g++ that you are using?
-
February 5th, 2011, 04:34 AM
#8
Re: Building Boost for Mingw
Originally Posted by laserlight
what is the version of the mingw port of g++ that you are using?
4.5.2
-
February 5th, 2011, 05:26 AM
#9
Re: Building Boost for Mingw
Here is GCC's output on where it searches:
Code:
install:
C:\MinGW\lib\mingw32/4.5.2/
programs:
c:/mingw/lib/../../libexec/gcc/mingw32/4.5.2/;
c:/mingw/lib/../../libexec/gcc/;
C:/MinGW/lib/../../mingw32/bin/mingw32/4.5.2/;
C:/MinGW/lib/../../mingw32/bin/
libraries:
C:/MinGW/lib/mingw32/4.5.2/;
C:/MinGW/lib/;
C:/MinGW/lib/../../mingw32/lib/mingw32/4.5.2/;
C:/MinGW/lib/../../mingw32/lib/;
C:/MinGW/lib/../mingw32/4.5.2/;
C:/MinGW/lib/../;
/mingw/lib/mingw32/4.5.2/;
/mingw/lib/
and it's all wrong, and the reason I'm having all my problems. Does anyone know how I can fix this?
-
February 5th, 2011, 04:18 PM
#10
Re: Building Boost for Mingw
for cross paltform dev you can't go wrong with with QT , comes with mingw , works great with boot , just decompress all header to include of mingw , as C:/QT/MingW/include , and the buildin IDE will pick it up straight away. you can grab a free one form here ,
http://qt.nokia.com/downloads
Last edited by aamir121a; February 5th, 2011 at 09:12 PM.
Reason: typo
-
February 5th, 2011, 08:00 PM
#11
Re: Building Boost for Mingw
Also you can download Nuwen's MinGW distro which contains GCC 4.5.2 and Boost 1.45.0
http://nuwen.net/mingw.html
If you're having trouble building it... Feel free to ignore this comment if it's not what you want.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|