Compiling a Multi-File Program
- Compiling a Two File Program (.h and .cpp)
- Use the -I flag to find any #include
files that are not part of the language
- g++ -o <execname> -I. <filename>.cpp
compiles a file filename.cpp, which includes
the filefile.h #include into an
executable named execname
- The '.' that appears after the -I stands for
the current working directory
- Compiling a Multi-File Program
|