Results 1 to 3 of 3

Thread: [SOLVED] Linking a project compiled with mingw : trouble with boost libs

  1. #1
    Join Date
    Sep 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default [SOLVED] Linking a project compiled with mingw : trouble with boost libs

    Hello,
    I am using QT4.8.3 with mingw 4.6. I have compiled boost 1.52 with mingw and I got in my lib directory of boost the lib "libboost_system-mgw46-mt-1_52.a" I need.

    In my project i added :
    LIBS += -L"F:\boost_1_52_0\lib" -lboost_system-mgw46-mt-1_52

    However qmake adds automatically in the Makefile : -llibboost_system-vc90-mt which doesn't exist as I compiled boost with mingw and not msvc. Il would like to know if there is a way to remove it.

    If in my directory I copy the library libboost_system-mgw46-mt-1_52.a to liblibboost_system-vc90-mt.a the linking goes well. The error comes only from what qmake added automatically.

    Thanks for your help,
    Francois
    Last edited by franchouze; 9th November 2012 at 14:31.

  2. #2
    Join Date
    Sep 2011
    Posts
    1,245
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Linking a project compiled with mingw : trouble with boost libs

    did you build qt with vc? Do you have QMAKESPEC in your environment? In other words, what have you done that would make qmake want to choose vc linking options?
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  3. #3
    Join Date
    Sep 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Linking a project compiled with mingw : trouble with boost libs

    Thanks for your help
    When checking again the Qt conf and looking for the QMAKESPEC I found out that somewhere else in the .pro file there was another LIBS += with this library name... :-/
    Everything works fine now !
    Francois

Similar Threads

  1. Replies: 3
    Last Post: 1st June 2011, 16:32
  2. Split project into shared libs - linking issue.
    By porterneon in forum Newbie
    Replies: 9
    Last Post: 30th May 2011, 15:15
  3. Replies: 3
    Last Post: 20th September 2010, 23:36
  4. Replies: 2
    Last Post: 24th August 2010, 17:47
  5. 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.