Открыть файл winavr/doc/gcc/gcc.pdf и прочитать раздел 3.2, где написано, что :
file.cc file.cp file.cxx file.cpp file.CPP file.c++ file.C
C++ source code which must be preprocessed. Note that in ‘.cxx’, the last two letters must both be literally ‘x’. Likewise, ‘.C’ refers to a literal capital C.
Или чуть дальше :
You can specify the input language explicitly with the ‘-x’ option:
-x language
Specify explicitly the language for the following input files (rather than letting the compiler choose a default based on the filename suffix). This option applies to all following input files until the next ‘-x’ option. Possible values for language are:
c c-header cpp-output c++ c++-header c++-cpp-output objective-c objective-c-header objc-cpp-output assembler assembler-with-cpp ada f77 f77-cpp-input ratfor java treelang
То есть, либо переименуйте исходный файл, либо добавьте ключ -x c++ в строку вызова компилятора. Переименовать исходник предпочтительнее, поскольку вы сможете использовать как "с", так и "срр" исходные файлы в одном проекте.
|