c to c++ x2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

c to c++ x2

418 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by arthemuz@hotmail.com on Wed Jan 22 17:38:59 MST 2014
I'm sorry once again ask the question, but I still can not create a C + + project. When I LPCOPEN new C + + project, the project that is created is C. mcu 11C24
Can not create a class. HELP
0 Kudos
9 Replies

389 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by arthemuz@hotmail.com on Thu Jan 23 10:41:23 MST 2014
Thank you for your help it was a version problem.
0 Kudos

389 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Jan 23 01:15:28 MST 2014

Quote: arthemuz@hotmail.com
Building file: ../src/crp.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -DDEBUG -D__CODE_RED -DCORE_M0 -D__USE_LPCOPEN -D__LPC11XX__ -D__NEWLIB__ -I"/Users/NICO/Documents/LPCXpresso_6.1.2/lpcopen/nxp_lpcxpresso_11c24_board_lib/inc" -I"/Users/NICO/Documents/LPCXpresso_6.1.2/lpcopen/lpc_chip_11cxx_lib/inc" -O0 -g3 -Wall -c -fmessage-length=0 -



Update to LPCXpresso 6.1.4 - there was an issue with creating C++ LPCOpen projects in earlier releases.

Regards,
LPCXpresso Support
0 Kudos

389 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Jan 23 00:42:00 MST 2014
If you want to build C++, you MUST create a C++ project. A C++ project builds C and C++ files. A C project builds C files only.

File with extension ".c" are compiled with the C compiler. Files with extension ".cpp" are compiled with the C++ compiler.
0 Kudos

389 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by liaochengyi on Thu Jan 23 00:09:31 MST 2014
Hi,

Lpcxpresso to create the c++ project is OK.

Maybe you can upload your project or take some picture and upload, then some body can give you a hand.

Good luck. 
0 Kudos

389 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by arthemuz@hotmail.com on Wed Jan 22 23:16:26 MST 2014
OK desolated I speak French, I translated by Google translation.
I am under Windows 8.1, I'll try to be clearer in my explanation.
When I create

  a new workspace, and I import the demo project, everything works it's ok.
but if I created a new C + + project, the project does not have C + + but in C?
My problem is this creates a new "class" c + +
right click new class toto.h I call toto.cpp and include its not working
for (empty project)

that's why I envoier console "he says it is Invoking: MCU C Compiler"

so I said that it is poorly configured to compile C + +.

sorry for vocabulary c I hope that clearer
0 Kudos

389 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Jan 22 22:16:25 MST 2014

Quote: R2D2


Could be useful if you describe (in detail) what you are doing , which OS and LPCXpresso you are using and if you also post your project...



Since you don't answer questions I still don't know what you are doing. So I'll stop trying to help you.

Latest LPCXpresso / LPCOpen is working without problems with Win7 here:

Quote:

Building file: ../src/crp.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__NEWLIB__ -DDEBUG -D__CODE_RED -DCORE_M0 -D__USE_LPCOPEN -DCPP_USE_HEAP -D__LPC11XX__ -I"D:\nxp\worklpcopen\LPCOpen_LPC11C24_C++Test\inc" -I"D:\nxp\worklpcopen\nxp_lpcxpresso_11c24_board_lib\inc" -I"D:\nxp\worklpcopen\lpc_chip_11cxx_lib\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/crp.d" -MT"src/crp.d" -o "src/crp.o" "../src/crp.c"
Finished building: ../src/crp.c
[color=#f00]
Building file: ../src/main.cpp
Invoking: MCU C++ Compiler[/color]
arm-none-eabi-c++ -D__NEWLIB__ -DDEBUG -D__CODE_RED -DCORE_M0 -D__USE_LPCOPEN -DCPP_USE_HEAP -D__LPC11XX__ -I"D:\nxp\worklpcopen\LPCOpen_LPC11C24_C++Test\inc" -I"D:\nxp\worklpcopen\nxp_lpcxpresso_11c24_board_lib\inc" -I"D:\nxp\worklpcopen\lpc_chip_11cxx_lib\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/main.d" -MT"src/main.d" -o "src/main.o" "../src/main.cpp"
Finished building: ../src/main.cpp

0 Kudos

389 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by arthemuz@hotmail.com on Wed Jan 22 20:38:42 MST 2014
Building file: ../src/crp.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -DDEBUG -D__CODE_RED -DCORE_M0 -D__USE_LPCOPEN -D__LPC11XX__ -D__NEWLIB__ -I"/Users/NICO/Documents/LPCXpresso_6.1.2/lpcopen/nxp_lpcxpresso_11c24_board_lib/inc" -I"/Users/NICO/Documents/LPCXpresso_6.1.2/lpcopen/lpc_chip_11cxx_lib/inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/crp.d" -MT"src/crp.d" -o "src/crp.o" "../src/crp.c"
Finished building: ../src/crp.c

Building file: ../src/main.c
Invoking: MCU C Compiler
In file included from ../src/main.c:20:0:

.[color=#f03]./src/SCVX.h:11:1: error: unknown type name 'class'[/color] /*???????????????????????????????????????????????????????????????


arm-none-eabi-gcc -DDEBUG -D__CODE_RED -DCORE_M0 -D__USE_LPCOPEN -D__LPC11XX__ -D__NEWLIB__ -I"/Users/NICO/Documents/LPCXpresso_6.1.2/lpcopen/nxp_lpcxpresso_11c24_board_lib/inc" -I"/Users/NICO/Documents/LPCXpresso_6.1.2/lpcopen/lpc_chip_11cxx_lib/inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/main.d" -MT"src/main.d" -o "src/main.o" "../src/main.c"
../src/SCVX.h:11:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
make: *** [src/main.o] Error 1

04:34:44 Build Finished (took 466ms)
0 Kudos

389 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by arthemuz@hotmail.com on Wed Jan 22 20:32:34 MST 2014
I can not be more specific, I did not create a project in C + + mode. lpcexpreso remains in C mode? even files remains.  C not cpp ????
0 Kudos

389 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Jan 22 19:55:53 MST 2014

Quote: arthemuz@hotmail.com
I'm sorry once again ask the question...



Could be useful if you describe (in detail) what you are doing , which OS and LPCXpresso you are using and if you also post your project...

0 Kudos