I am converting my non RTOS based C++ project to SYS/BIOS. The SYS/BIOS project compiled, but had link error.
The link problem can be reproduced by creating a SYS/BIOS idle project from the template. Once the idle SYS/BIOS project is created, build the project. The project will build with no errors. If I add a new souce file to the project called idle.cpp, then copy the code from idle.c to idle.cpp, then exclude idle.c from build, leave only idle.cpp to build, the project will complie but will not build and error messages are:
errors encountered during linking; "idle.out" not built idle line 0 1319039250738 3106
unresolved symbol myIdleFxn, first referenced in C:\Documents idle line 0 1319039250738 3104
unresolved symbol myTickFxn, first referenced in C:\Documents idle line 0 1319039250738 3105
It appears that C++ compiler/linker are different from C compiler/linker. C++ compiler does some optimization and removes myIdleFxn and myTickFxn because it does not seem to see the references to the functions although sys/bios config file references the functions.
There must be a C++ compiler setting somewhere to fix this problem. I tried different settings in C/C++ build with no success. I would appreciate some help from the E2E. Thanks.
Chun