3 Replies Latest reply on Jun 19, 2020 5:12 AM by AnjanaM_61

    Does modus toolbox 2.1 support c++




      I recently moved from Modus Toolbox 1.1 to 2.1. I must say it is much easier to use, however I have problems with adding .cpp files. I never tried that with 1.1 version.


      So I took an example bt empty application. After setuping SDK I was able to build that example application. I wanted then to test if .cpp files are supported – I think they weren’t supported for Modus Toolbox 1.1. I just added very basic .cpp file in example directory. Modus Toolbox autodetected my file and tried to compile but I am getting an error when compiling:

      C:/Program Files (x86)/mingw-w32/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.1.0/../../../../i686-w64-mingw32/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x39): undefined reference to `WinMain@16'

      collect2.exe: error: ld returned 1 exit status

      make[1]: *** [../../../wiced_btsdk/dev-kit/baselib/20819A1/make/core/build.mk:350: C:/*/mt/mtb-examples-CYW920819EVB-02-btsdk-empty_4/template/empty_wiced_bt/build/CYW920819EVB-02/Debug/dummy.o] Error 1

      make[1]: *** Waiting for unfinished jobs....

      make: *** [../../../wiced_btsdk/dev-kit/baselib/20819A1/make/core/main.mk:350: secondstage] Error 2

        "C:/Users/THINK/ModusToolbox2.1.0/tools_2.1/modus-shell/bin/make CY_MAKE_IDE=eclipse CY_IDE_TOOLS_DIR=C:/Users/THINK/ModusToolbox2.1.0/tools_2.1 -j8 all" terminated with exit code 2. Build might be incomplete.

      I tried to go through Makefile rules, but it is quite complex. Can you guide me how to properly add .cpp file to my project? Or maybe it is not yet supported? What would be alternative then ?