Compiling C and C++ files together using GCC
Compile the files separately, link with g++
gcc -c -std=c99 -o file1.o file1.c
g++ -c -std=c++0x -o file2.o file2.cpp
g++ -o myapp file1.o file2.o
sdmrnv, 2022-10-18 [0.401ms, s]
Compile the files separately, link with g++
gcc -c -std=c99 -o file1.o file1.c
g++ -c -std=c++0x -o file2.o file2.cpp
g++ -o myapp file1.o file2.o