//----------------------------------------------------
//AUTHOR: lanyang123456
//DATE: 2014-10-21
//----------------------------------------------------
/*
compiler_test
gcc and g++
*/
#include <iostream>
#include <stdio.h>
int main()
{
printf("hello\n");
}
/*
$ gcc -o test compiler_test.cpp
/tmp/cc4Xz5MO.o: In function `__static_initialization_and_destruction_0(int, int)':
compiler_test.cpp:(.text+0x38): undefined reference to `std::ios_base::Init::Init()'
compiler_test.cpp:(.text+0x47): undefined reference to `std::ios_base::Init::~Init()'
collect2: error: ld returned 1 exit status
$ gcc -o test compiler_test.c
compiler_test.c:3:20: fatal error: iostream: No such file or directory
#include <iostream>
^
compilation terminated.
$ g++ -o test compiler_test.c
$ ./test
hello
$ g++ -o test compiler_test.cpp
$ ./test
hello
*/