windows - QT and Boost : Cannot find -llibboost_filesystem -


i work (and cannot other version of qt) :

  • qt creator 2.4.1 , qt 4.8.4 (with mingw compiler)
  • boost 1.52

to build boost :

  • i first added "c:/qt/qtcreator-2.4.1/mingw/bin" path variable
  • then opened command prompt
  • went "c:/boost_1_52"
  • typed "bootstrap.bat mingw"
  • and "b2 toolset=gcc build-type=complete stage" (this took long time (about 2h))

i use qt creator boost library come against difficulties. project simple, it's basic qt code :

qcoreapplication a(argc, argv)  return a.exec() 

i added includes :

#include <boost/thread.hpp> #include <boost/property_tree/json_parser.hpp>  #include <boost/asio.hpp> #include <boost/timer.hpp> 

in .pro file have added :

defines += boost_all_use_lib  includepath += c:/boost_1_52 libs += -lc:/boost_1_52/stage/lib \ -lboost_system-mgw48-mt-1_52 \ -lboost_thread-mgw48-mt-1-52 \ -lboost_timer-mgw48-mt-1_52  #"libboost_system..." needs library libs += -lc:/windows_sdk/lib \ -lws2_32 

when build projects have 2 kinds of 'undefined reference to' :

  • some 'thread' in :

    undefined reference `boost::thread::thread()' undefined reference `boost::thread::joinable() const' 
  • some looks :

    undefined reference `boost::system::generic_category()' undefined reference `boost::system::system_category()' 

thank in advance help.

try this.

libs += "-lc:/boost_1_57_0/libs/" \ 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -