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.

Should I use "Treat C files as C++ files"?

Hi

I'm converting code from the DM642 to the DM648 and I get a lot of "undefined symbols" during link. The issue seems to be that the dm642 project was built using the "Treat C files as C++ files (-fg)" compiler switch. If I try using the -fg for the dm648, I get "undefined symbols" for the vport, i2c, and edma libraries.

Which would be better: 1) add #ifdef __cplusplus extern "C" to my .h files, or 2) re-compile all the libraries. Seems like adding extern "C" would be better since re-compiling all the vport, i2c and edma libraries -fg would make the libraries incompatible with my other programs. Am I seeing the choices correctly? Are there more?

Cheers
Eddie