Results 1 to 16 of 16

Thread: How to build boost for MinGW?

  1. #1
    Join Date
    Oct 2010
    Posts
    95
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question How to build boost for MinGW?

    Hi,

    I'm trying to use Boost 1.44 with QT Creator for this I have try this :
    1 - download boost 1.44 from the Boost web site, and unzip it
    2 - download the bjam.exe and copy it in the root of boost
    3 - run the following command :

    d:\Boost\boost_1_44_0>bjam stage --build-type=complete --build-dir="d:\Boost144\
    build" --toolset=gcc --stagedir="d:\Boost144"

    But I got the following errors :

    d:\Boost\boost_1_44_0>bjam stage --build-type=complete --build-dir="d:\Boost144\
    build" --toolset=gcc --stagedir="d:\Boost144"
    notice: could not find main target stage
    notice: assuming it is a name of file to create.
    D:/Boost/boost_1_44_0/tools/build/v2/build\project.jam:737: in attribute
    warning: rulename $($(project).attributes).get expands to empty string
    D:/Boost/boost_1_44_0/tools/build/v2/build\project.jam:749: in project.target
    D:/Boost/boost_1_44_0/tools/build/v2\build-system.jam:707: in load
    d:\Boost\boost_1_44_0\tools\build\v2/kernel\modules.jam:283: in import
    d:\Boost\boost_1_44_0\tools\build\v2\kernel\bootst rap.jam:142: in boost-build
    d:\Boost\boost_1_44_0\boost-build.jam:17: in module scope
    D:/Boost/boost_1_44_0/tools/build/v2/build\project.jam:737: in project.attribute

    warning: rulename $($(project).attributes).get expands to empty string
    D:/Boost/boost_1_44_0/tools/build/v2/build\targets.jam:206: in object(project-ta
    rget)@43.__init__
    D:/Boost/boost_1_44_0/tools/build/v2/kernel\class.jam:88: in new
    D:/Boost/boost_1_44_0/tools/build/v2/build\project.jam:749: in project.target
    D:/Boost/boost_1_44_0/tools/build/v2\build-system.jam:707: in load
    d:\Boost\boost_1_44_0\tools\build\v2/kernel\modules.jam:283: in import
    d:\Boost\boost_1_44_0\tools\build\v2\kernel\bootst rap.jam:142: in boost-build
    d:\Boost\boost_1_44_0\boost-build.jam:17: in module scope
    :/Boost/boost_1_44_0/tools/build/v2/build\project.jam:737: in project.attribute

    warning: rulename $($(project).attributes).get expands to empty string
    D:/Boost/boost_1_44_0/tools/build/v2/build\targets.jam:226: in object(project-ta
    rget)@43.get
    D:/Boost/boost_1_44_0/tools/build/v2\build-system.jam:720: in load
    d:\Boost\boost_1_44_0\tools\build\v2/kernel\modules.jam:283: in import
    d:\Boost\boost_1_44_0\tools\build\v2\kernel\bootst rap.jam:142: in boost-build
    d:\Boost\boost_1_44_0\boost-build.jam:17: in module scope
    D:/Boost/boost_1_44_0/tools/build/v2\build-system.jam:721: in load
    *** argument error
    * rule project.load ( jamfile-location )
    * called with: ( )
    * missing argument jamfile-location
    D:/Boost/boost_1_44_0/tools/build/v2/build\project.jam:53:see definition of rule
    'load' being called
    d:\Boost\boost_1_44_0\tools\build\v2/kernel\modules.jam:283: in import
    d:\Boost\boost_1_44_0\tools\build\v2\kernel\bootst rap.jam:142: in boost-build
    d:\Boost\boost_1_44_0\boost-build.jam:17: in module scope
    Do you have an idea to solve my problem and build boost please ?

    thx

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT Creator + Boost ? How to build boost for QT ?

    How is this question related to Qt?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2010
    Posts
    95
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT Creator + Boost ? How to build boost for QT ?

    It is related to QT because :

    1 - I want to use Boost from QT Creator
    2 - I must compile the Boost library with MinGW in order to use boost with QT

    I'm able to build boost for Visual Studio (using the MS Compiler) but not with the compiler provided with QT Creator. I'm currently trying to port my code from VS to QT Creator... simply :-)

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QT Creator + Boost ? How to build boost for QT ?

    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Oct 2010
    Posts
    95
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT Creator + Boost ? How to build boost for QT ?

    Thanks,

    I would like to use bost 1.44, I can build it with VS2008 but not with MinGW provided with QTCreator ! It is the problem :-P

  6. #6
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QT Creator + Boost ? How to build boost for QT ?

    See this link it contains both information and already build with mingw boost library download.

  7. #7
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,671
    Thanks
    13
    Thanked 1,595 Times in 1,523 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT Creator + Boost ? How to build boost for QT ?

    There's no issue building the as-delivered Boost source with MingW in the Qt SDK. The build command straight from the Boost documentation:
    Qt Code:
    1. bjam --build-dir=build-directory toolset=toolset-name --build-type=complete stage
    To copy to clipboard, switch view to plain text mode 
    that is:
    Qt Code:
    1. Y:> cd \boost_1_44_0
    2. Y:> bjam --build-dir=build toolset=gcc --build-type=complete stage
    To copy to clipboard, switch view to plain text mode 
    works a treat.

  8. The following user says thank you to ChrisW67 for this useful post:

    Zlatomir (9th November 2010)

  9. #8
    Join Date
    Jun 2010
    Posts
    102
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QT Creator + Boost ? How to build boost for QT ?

    Quote Originally Posted by ChrisW67 View Post
    There's no issue building the as-delivered Boost source with MingW in the Qt SDK. The build command straight from the Boost documentation:
    Qt Code:
    1. bjam --build-dir=build-directory toolset=toolset-name --build-type=complete stage
    To copy to clipboard, switch view to plain text mode 
    that is:
    Qt Code:
    1. Y:> cd \boost_1_44_0
    2. Y:> bjam --build-dir=build toolset=gcc --build-type=complete stage
    To copy to clipboard, switch view to plain text mode 
    works a treat.
    you can read in: http://forums.congdongcviet.com/showthread.php?t=28355
    and download binary built: http://forums.congdongcviet.com/atta...3&d=1270220820
    Contact: Skype: sonnh89
    Yahoo: nhs_0702@yahoo.com

    Liên hệ SKype: sonnh89

  10. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT Creator + Boost ? How to build boost for QT ?

    This is an English speaking forum, please don't post links to resources in other languages.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  11. #10
    Join Date
    Oct 2010
    Posts
    95
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT Creator + Boost ? How to build boost for QT ?

    It is what I try... my machine is Win7 64 bits... maybe there is a problem with this ?

    I got this error :

    D:/Boost/boost_1_44_0/tools/build/v2\build-system.jam:721: in load
    *** argument error
    * rule project.load ( jamfile-location )
    * called with: ( )
    * missing argument jamfile-location
    I have check the "build-system.jam:721" and I have :

    local first-project-root-module = [ project.load $(first-project-root-location) ] ;

  12. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT Creator + Boost ? How to build boost for QT ?

    I really suggest to move this discussion to some Boost related forum. This issue has nothing to do with Qt. The sole fact that in some future you wish to use Boost with Qt doesn't make it a Qt issue. If that was the case, installing Windows on your machine or choosing a graphics card for your computer could also be treated as "Qt issues". Moving to "General Programming" and changing the thread title...
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  13. #12
    Join Date
    Oct 2010
    Posts
    95
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT Creator + Boost ? How to build boost for QT ?

    Thanks,

    But I'm not sure, in fact it is a mix of both !

    1 - I use mingw provided with QT Creator
    2 - Boost must be compiled with the same compiler

    So, it sounds that everybody can compile boost with a normal distribution of mingw. But maybe the problem is an error in the distribution provided with QT Creator.

  14. #13
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QT Creator + Boost ? How to build boost for QT ?

    There is nothing special with the MinGW provided with Qt, AFAIK.
    Try getting MinGW on its own, and see if you get boost built then.
    If you do, you can use the resulting libs with the MinGW you got with Qt.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  15. #14
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,671
    Thanks
    13
    Thanked 1,595 Times in 1,523 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT Creator + Boost ? How to build boost for QT ?

    The exact command line to use to build Boost with the MingW shipped in the Qt SDK is already in this thread and the Boost docs and works quite fine.

  16. #15
    Join Date
    Oct 2010
    Posts
    95
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT Creator + Boost ? How to build boost for QT ?

    Thanks for all your answer,

    I have finally build boost 1.44 under Vista 32 bist, all work fine. I have copy all the ".a" files. But I have problem in the "link" phase. I got the following message :

    undefined reference to `_imp___ZN5boost6thread9interruptEv'
    error: undefined reference to `_imp___ZN5boost6thread4joinEv'
    ...
    Here is what I have in my .pro file

    INCLUDEPATH += "C:/Boost/include/boost-1_44"
    DEPENDPATH += "C:/Boost/include/boost-1_44"

    win32:CONFIG(release, debug|release): LIBS += "C:/Boost/lib/libboost_thread-mgw44-mt-d-1_44.a"
    else:win32:CONFIG(debug, debug|release): LIBS += "C:/Boost/lib/libboost_thread-mgw44-mt-d-1_44.a"

  17. #16
    Join Date
    Feb 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to build boost for MinGW?

    You can download the pre-compiled libs generated with the latest QT mingw gcc

    http://www.cogniteam.com/wiki

Similar Threads

  1. Static build of Qt-4.6.3 fails with MinGW
    By gib in forum Installation and Deployment
    Replies: 0
    Last Post: 18th September 2010, 04:32
  2. Build LibTorrent to .lib Mingw
    By nhs_0702 in forum Qt Programming
    Replies: 0
    Last Post: 2nd April 2010, 13:01
  3. Build QTCreator boost::filesystem
    By nhs_0702 in forum Newbie
    Replies: 5
    Last Post: 1st April 2010, 08:46
  4. Qt + boost + MinGW on Windows
    By akos.maroy in forum Newbie
    Replies: 3
    Last Post: 12th June 2008, 15:53

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.