Coding in C++ in Creator 2.2 | Cypress Semiconductor
Coding in C++ in Creator 2.2
I am relatively new to Psoc5 and Creator and am re-acquainting myself with C++. I am having difficulties getting a particular program to build. I know that Creator is C based but that one can also "force" it to recognize and compile C++ code. The program is extremely simple:
using namespace std;
int GetFibNumber(int FibIndex)
if (FibIndex < 2)
return GetFibNumber(FibIndex - 1) + GetFibNumber(FibIndex - 2);
cout << "Enter 0-based index of desired Fibonacci Number: ";
int Index = 0;
cin >> Index;
cout << "Fibonacci number is: " << GetFibNumber(Index) << endl;
In the Build Settings associated with all .c files I have added "-x c++" as a custom flag in the command line. The errors I get when I build this is:
prj.M0120: undefined symbol `Reset' referenced in expression
prj.M0120: The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.
Any ideas what I'm missing? Thanks.