I wanted to create a new C executable project, and I like the way the IDE works, but when I tried to build and run the project I got an error.
Code: Select all
Building:
"make" -j 1 -f "Maurice_wsp.mk"
----------Building project:[ HelloWorld2 - Debug ]----------
gcc -c "/home/Maurice/.codelite/Maurice/HelloWorld2/main.cpp" -g -o ./Debug/main.o -I.
gcc -o ./Debug/HelloWorld2 ./Debug/main.o
./Debug/main.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
make[1]: *** [Debug/HelloWorld2] Error 1
make: *** [All] Error 2
0 errors, 0 warnings, total time: 00:00:00 seconds
----------Build Ended----------
If I change the file extension to .c, Clean, and try to compile it works correctly.
Now I was wondering why C files get the cpp extension by default, and whether there is an option somewhere to change that to .c ?
Thanks!