8 years, 11 months ago.

USBMidi error when I try to compile the program

Hello, When I try to import the Hello World program here https://developer.mbed.org/cookbook/USBMIDI ,everything is ok but when I compile it, it gives me the following error : #error directive: "CMSIS Target not recognised" in "extras/mbed_e2ac27c8e93e/cmsis.h", Line: 16, Col: 3. I saw on some messages that it was the fault of my mbed revision, so I updated it to the latest version, and now I have many errors : Warning: C4017W: regarg_1 may be used before being set in "USBMIDI/USBMIDI.cpp", Line: 57, Col: 12 Error: Identifier "namespace" is undefined in "extras/mbed_7cff1c4259d7/DigitalIn.h", Line: 23, Col: 2 Error: Expected a ";" in "extras/mbed_7cff1c4259d7/DigitalIn.h", Line: 23, Col: 17 Warning: Parsing restarts here after previous syntax error in "extras/mbed_7cff1c4259d7/DigitalIn.h", Line: 102, Col: 17 Error: Expected a declaration in "extras/mbed_7cff1c4259d7/DigitalIn.h", Line: 103, Col: 2 Error: Expected a declaration in "extras/mbed_7cff1c4259d7/DigitalIn.h", Line: 105, Col: 2 Warning: Parsing restarts here after previous syntax error in "extras/mbed_7cff1c4259d7/DigitalOut.h", Line: 111, Col: 17

I have tried to compile it on the KL25Z platform, but I also have a LPC1768 and doesn't works too. Thanks for your help.

1 Answer

8 years, 1 month ago.

Hi

Sorry this answer is 10 months late. Nevertheless, what worked for me was when looked at the file names within the USBMidi library some of them contained the filename extension "c" instead of "cpp". Changing it might help. Let me know if it does...or doesn't.