Hi, Is there any way to tell g++ to link to specific libraries from within the source code,
for example if I use boost_filesystem functions I have to compile using explicitly the -l option: g++ main.cpp -o main -lboost_filesystem this is very anoying if I have many different source files and I don't want to remember which libraries have to be linked for each one and I don't want to deal with makefiles. I am asking if the is a pragma or anything of this sort //file main.cpp #automatic_link_to boost_filesystem <--- something like this int main(){ .. use boost::filesystem function.. return 0; } //end of file and then g++ main.cpp -o main would "just work", without having to specify "-lboost_filesystem" Is there something like this? Thank you Alf _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus