c++ - How to set the '-l' argument for g++ in eclipse? -
c++ - How to set the '-l' argument for g++ in eclipse? -
trying compile boost c++ code have found out 1 needs name libraries used explicit. so, given next code:
#include<iostream> #include<boost/filesystem/operations.hpp> namespace bfs=boost::filesystem; int main() { bfs::path p("second.cpp"); if(bfs::exists(p)) std::cout<<p.leaf()<<std::endl; }
i able compile (and link) next command line
g++ -o main main.cpp -lboost_filesystem -lboost_system
how can define -l
libraries in eclipse, eclipse able compile (and link) code without undefined reference
error?
this question on usage , configuration of eclipse.
you need go
project -> properties
and add together libraries want utilize manually. see screenshot:
c++ eclipse
Comments
Post a Comment