/home/richel/qtsdk-2010.04/bin/Projects/Website/CppFile-build-desktop/main.o:: In function `boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> boost::filesystem::current_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >()': /usr/include/boost/filesystem/operations.hpp:530: error: undefined reference to `boost::filesystem::detail::get_current_path_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' :: error: collect2: ld returned 1 exit status
Operating system: Ubuntu 10.04 LTS Lucid Lynx
IDE: Qt Creator 2.0.0
Project type: Console Application
Libraries used:
#------------------------------------------------- # # Project created by QtCreator 2010-08-02T13:45:48 # #------------------------------------------------- QT += core QT -= gui TARGET = MyTarget CONFIG += console CONFIG -= app_bundle TEMPLATE = app LIBS += -L/usr/local/lib -lboost_system SOURCES += main.cpp
#include <boost/filesystem.hpp> int main() { boost::filesystem::path my_path( boost::filesystem::initial_path<boost::filesystem::path>()); }
Add the following line to the Qt project file: