Skip to main content
orhanyilmaz
Associate III
February 3, 2015
Question

How to use C++?

  • February 3, 2015
  • 2 replies
  • 880 views
Posted on February 03, 2015 at 08:57

Hello,

I'm trying use Class but not working... Console out:

source/PIDControl.h:11:1: error: unknown type name 
'class'
source/PIDControl.h:11:19: error: expected 
'='
, 
','
, 
';'
, 
'asm'
or 
'__attribute__'
before 
'{'
token
make: *** [build/obj/main.o] Error 1

How to use C++ for example Class? #orhan-yılmaz #c++ #oop
    This topic has been closed for replies.

    2 replies

    Erwan YVIN
    ST Technical Moderator
    February 3, 2015
    Posted on February 03, 2015 at 11:36

    Hello Yilmaz ,

    have you tried the c++ compiler ?

    /cygdrive/c/SPC5Studio/eclipse/plugins/com.st.tools.spc5.tools.hightec_1.0.0.201306281422/hightec/bin

    $ ppc-vle-c++.exe --version

    ppc-vle-c++.exe (HighTec Release free-toolchain-v4.6.2.1) 4.6.3 build on 2013-01-07

    for this , you need to create a new platform component

      Best regards

                  Erwan

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
    disirio2
    Associate III
    February 7, 2015
    Posted on February 07, 2015 at 09:25

    Hi,

    In user.mak replace main.c with main.cpp or put your files with cpp extension under ./source. I never tested it but the Makefile supports it.

    Giovanni