Forum Discussion
Altera_Forum
Honored Contributor
14 years agoC++ compiler errors
I am new to C++/ucos II. Compiling a simple test C++ program gets the following error messages: error: 'alt_irq_register' was not declared in this scope error: invalid conversion from ...
Altera_Forum
Honored Contributor
14 years agoThe GCC behaves different for c and c++ code. This is caused by the different file extentions. To make some library code like OS code run under c++ you have to declare it properly as "pure" c code. This is also required for some other hardware interface stuff.
for example: #ifdef __cplusplus extern "C" { #endif // c specific stuff #ifdef __cplusplus } #endif