Hi Yen, Try this... g++ -Wall -O2 -s main.cpp a.cpp b.cpp >So, how do I compile this program to generate the objective file? Ahh, the above does generate object files, it generates the executable. To generate the object files of each of those, try this... g++ -c -Wall -O2 main.cpp g++ -c -Wall -O2 a.cpp g++ -c -Wall -O2 b.cpp And then to get the executable... g++ -s main.o a.o b.o HTH, --Eljay