Cannot find _fini and _init at link when C++ option used

I have created a basic project using the wizard and selected the options I needed of Web, FTP and File System. I need to use C++ for some of the code in the system but when I enable the C++ option in project properties it is causing linker errors because _fini and _init cannot be found.

If I use the C++ demo from the sample projects there is no linker problem. Are there any specific libraried I have to include to get the linking to work ?


Some ideas:

  1. Did you list your files under APP_CC_FILES instead of APP_C_FILES in the makefile?
  2. Did you add the extern ā€œCā€ to your init functions?
  3. When you moved your source, did you adjust the NETOS_DIR path in the makefile?
  4. In your appconf.h, did you define APP_CPP as TRUE?