This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMS320F28335: template <class T>: Getting "this declaration may not have extern "C" linkage"

Guru 20075 points

Part Number: TMS320F28335

Tool/software: TI C/C++ Compiler

Hello,

I created a circular buffer template class and placed it in a header file. 

The circular buffer template class compiles without errors in one of my projects; however, for another project, the compiler generates a "this declaration may not have extern "C" linkage"  for each line that has template <class T>.

A lot of the headers files in the project that doesn't compile have 

#ifdef __cplusplus
extern "C" {

#ifdef __cplusplus
}
#endif /* extern "C" */

Removing all the extern "C" from the header files included in the template class file and the files that uses the template class doesn't get rid of the error.

Any suggestions?

Stephen