Quelle librairie linker pour filesystem avec MinGW?
Bonjour, j'ai compilé filesystem sous XP et mingw avec bjam:
Code:
bjam --toolset=gcc --with=filesystem stage
J'ai obtenu les librairies suivantes (avec des dlls) dans un sous dossier \stage\libs:
Citation:
29/03/2008 20:09 95˙130 boost_filesystem-mgw34-1_34_1.a
29/03/2008 20:09 204˙366 boost_filesystem-mgw34-d-1_34_1.a
29/03/2008 20:09 95˙984 boost_filesystem-mgw34-mt-1_34_1.a
29/03/2008 20:09 205˙456 boost_filesystem-mgw34-mt-d-1_34_1.a
29/03/2008 20:10 71˙598 libboost_filesystem-mgw34-1_34_1.a
29/03/2008 20:10 3˙147˙826 libboost_filesystem-mgw34-d-1_34_1.a
29/03/2008 20:10 71˙598 libboost_filesystem-mgw34-mt-1_34_1.a
29/03/2008 20:09 3˙147˙826 libboost_filesystem-mgw34-mt-d-1_34_1.a
29/03/2008 20:10 71˙598 libboost_filesystem-mgw34-mt-s-1_34_1.a
29/03/2008 20:10 3˙147˙826 libboost_filesystem-mgw34-mt-sd-1_34_1.a
29/03/2008 20:11 71˙598 libboost_filesystem-mgw34-s-1_34_1.a
29/03/2008 20:10 3˙147˙826 libboost_filesystem-mgw34-sd-1_34_1.a
Quelle librairie je dois linker pour mes projets?
J'ai essayer avec chaqune d'entre elle avec ce bout de programme:
Code:
1 2 3 4 5 6 7 8
| #include <boost\filesystem\path.hpp>
#include <boost\filesystem\operations.hpp>
int main()
{
boost::filesystem::path p;
p = boost::filesystem::current_path();
} |
Citation:
EXEC = test
IPATHS = -IC:\boost_1_34_1
LPATHS = -LC:\boost_1_34_1\stage\lib
LFLAGS = -lboost_filesystem-mgw34-d-1_34_1
$(EXEC): main.o
g++ $(LPATHS) $(LFLAGS) $^
main.o: main.cpp
g++ $(IPATHS) -c $^
et j'obtiens:
Citation:
g++ -LC:\boost_1_34_1\stage\lib -lboost_filesystem-mgw34-d-1_34_1 main.o
main.o(.text$_ZN5boost10filesystem12current_pathINS0_10basic_pathISsNS0_11path_traitsEEEEET_v[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> >()]+0x6a):main.cpp: undefined reference to `boost::filesystem::detail::get_current_path_api(std::string&)'
collect2: ld returned 1 exit status
mingw32-make: *** [test] Error 1