How do I use g++ to create object file with a specific name How do I use g++ to create object file with a specific name unix unix

How do I use g++ to create object file with a specific name


Use the -o option in conjunction with -c.

exptrtest.o: exprtest.cpp    g++ -Wall -g -c exprtest.cpp -o exptrtest.o