g++: Compiling without -l flags
问题 Simple question- are these any way to not have to call libraries during the compiling? I mean, I would like to simply call g++ main.cpp without calling g++ main.cpp -lGL -lGLU -lGLEW -lSTL -lMyMother and so on... I know, makefiles or simple shell scripting, but I would like to make it elegant way - call these libraries inside cpp code - something like 'using GL;'. 回答1: Since you're using GCC, you could create/modify a specs file to add the flags you want. If you don't like typing flags, you