Barney Szabolcs
Barney Szabolcs

Reputation: 12544

How do I integrate C++ Boost into a Qt project?

I would like to use boost/filesystem.hpp in my Qt app but the builder keeps saying:

Library not loaded: libboost_filesystem.dylib
Reason: image not found

here is how I try to link it:

INCLUDEPATH+= /installdir/boost_1_50_0  
LIBS += -L/installdir/boost_1_50_0/stage/lib -lboost_filesystem

I've tried linking directly, too. I've also tried rebuilding boost according to jschoen's answer, no difference.
Im running a MacOSX Lion. How do I have to link boost properly?

Upvotes: 2

Views: 3109

Answers (1)

Barney Szabolcs
Barney Szabolcs

Reputation: 12544

In the meantime I have found a solution.

  1. install boost with macports (sudo port install boost) Thanks to dies and Tim Cooper.
  2. then link against:

INCLUDEPATH += /opt/local/include
LIBS += -L/opt/local/lib
LIBS += -lboost_system-mt -lboost_filesystem-mt

Upvotes: 3

Related Questions