Quote:
Originally Posted by Scimor5
compiling in a terminal is really easy. for c++ programs using g++ and its arguments correctly takes care of everything.
Code:
g++ -o myProgram thing.cpp main.cpp
This command compiles and links the code files
"thing.cpp" and "main.cpp" together into the executable program called
"myProgram".
other things to worry about are libraries
-I : Sets the path to the include files.
-L : Sets the path to the libraries.
-l : Use this library (eg. -lm to use libmath.so, -lpthread to use libpthread.so)
You can have multiple -I, -L and -l entries.
So, your final command should look like this:
Code:
g++ -o myProgram thing.cpp main.cpp -I /path/to/includes -L /path/to/libraries -l library1 -l library2
info about libraries can be found with the pkgconfig command.
|
Haha! You have no idea how happy I am to have found a c++ person who knows about libraries

. I used to be a Java programmer - still am - but now I would like to make c++ my core language seen that I'm going to need it a ton in college. Could you send me links to resources that greatly aided you in learning c++? and could I private message you with questions as I go through my learning curve?