PDA

View Full Version : Anjuta ( newbie ): Source file extension ?



Biased turkey
November 27th, 2005, 07:39 PM
I used to program C++ with Kdevelop and switched to Anjuta.
With Kdevelop, a source file had the .c or .cpp extension ( depending if the program was a C or C++ ).
I ( successfully ) compile a C++ "hello world" program with Anjuta, but the source file has a .cc extension.
I'm not familiar at all with that file extension.
Could someone please be kind enough to give me some info about that ?
tia for any help

tageiru
November 27th, 2005, 09:29 PM
I used to program C++ with Kdevelop and switched to Anjuta.
With Kdevelop, a source file had the .c or .cpp extension ( depending if the program was a C or C++ ).
I ( successfully ) compile a C++ "hello world" program with Anjuta, but the source file has a .cc extension.
I'm not familiar at all with that file extension.
Could someone please be kind enough to give me some info about that ?
tia for any help
.cpp and .cc are the same thing. If i remember correctly .cpp is more common in Windows programming and .cc more common in UNIX-like systems.

Biased turkey
November 28th, 2005, 12:25 AM
.cpp and .cc are the same thing. If i remember correctly .cpp is more common in Windows programming and .cc more common in UNIX-like systems.

Thanks for your help Tageiru.
I just compiled " by hand" a sourcefile doing:
g++ file1.cc -o file1
and it worked nicely.

David Marrs
November 28th, 2005, 02:07 PM
The compiler won't care what the extension is. As long as there aren't any errors in the code, the file will compile. The extensions are there to help people first and foremost.

Burke
November 28th, 2005, 03:39 PM
Yeah, GCC will compile a *.exe, as long as its actually a source code file. :)