cancel
Showing results for 
Search instead for 
Did you mean: 

How to use C++?

orhanyilmaz
Associate II
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
2 REPLIES 2
Erwan YVIN
ST Employee
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

disirio2
Senior
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