I\'m trying to compile C and C++ sources together using GCC.
gcc -std=c++0x test.cpp -std=c99 test.c -lstdc++
Now, this works fine, except that
gcc is the C compiler and g++ is the C++ compiler. You are mixing the two languages with different styles. Compile apart and then link:
gcc
g++
gcc -std=c99 -c -o test.c.o test.c g++ -std=c++0x -c -o test.cpp.o test.cpp g++ -o executable test.cpp.o test.c.o