c++ 编译链接多个文件
如果只有一个文件的话
编译:
g++ test.cpp -o test
运行:
./test
编译链接多个文件
编译:
g++ -c test1.cpp
g++ -c test2.cpp
g++ test1.o test2.o -o test
运行:
./test
c++ 编译链接多个文件
如果只有一个文件的话
编译:
g++ test.cpp -o test
运行:
./test
编译链接多个文件
编译:
g++ -c test1.cpp
g++ -c test2.cpp
g++ test1.o test2.o -o test
运行:
./test