Sign in to our website and become an InMoov member. It will allow you to post message, pictures, and share with others InMoov builders. It's just one click away!
Username or Email Address
Password
Remember Me
Norbert posted an update 4 years, 11 months ago
Here the error report: Arduino: 1.8.9 (Windows 7), Board: “Arduino/Genuino Uno” In file included from sketch\LinkedList.h:72:0, from sketch\Msg.cpp:31: sketch\LinkedList.cpp: In member function ‘ListNode* LinkedList::getNode(int)’: LinkedList.cpp:75:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:96:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:128:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:161:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:199:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:211:1: error: a template declaration cannot appear at block scope template ^ Msg.cpp:34:20: error: qualified-id in declaration before ‘=’ token Msg* Msg::instance = NULL; ^ Msg.cpp:36:12: error: expected ‘;’ before ‘{‘ token Msg::Msg() { ^ Msg.cpp:40:13: error: expected ‘;’ before ‘{‘ token Msg::~Msg() { ^ Msg.cpp:45:22: error: qualified-id in declaration before ‘(‘ token Msg* Msg::getInstance(MrlComm* mrlComm) { ^ Msg.cpp:45:30: error: expected primary-expression before ‘*’ token Msg* Msg::getInstance(MrlComm* mrlComm) { ^ Msg.cpp:45:32: error: ‘mrlComm’ was not declared in this scope Msg* Msg::getInstance(MrlComm* mrlComm) { ^ Msg.cpp:51:22: error: qualified-id in declaration before ‘(‘ token Msg* Msg::getInstance() { ^ Msg.cpp:139:30: error: qualified-id in declaration before ‘(‘ token void Msg::publishMRLCommError(const char* errorMsg, byte errorMsgSize) { ^ Msg.cpp:148:27: error: qualified-id in declaration before ‘(‘ token void Msg::publishBoardInfo( byte version, byte boardType, int microsPerLoop, int sram, byte activePins, const byte* deviceSummary, byte deviceSummarySize) { ^ Msg.cpp:162:21: error: qualified-id in declaration before ‘(‘ token void Msg::publishAck( byte function) { ^ Msg.cpp:171:22: error: qualified-id in declaration before ‘(‘ token void Msg::publishEcho( float myFloat, byte myByte, float secondFloat) { ^ Msg.cpp:182:27: error: qualified-id in declaration before ‘(‘ token void Msg::publishCustomMsg(const byte* msg, byte msgSize) { ^ Msg.cpp:191:25: error: qualified-id in declaration before ‘(‘ token void Msg::publishI2cData( byte deviceId, const byte* data, byte dataSize) { ^ Msg.cpp:201:23: error: qualified-id in declaration before ‘(‘ token void Msg::publishDebug(const char* debugMsg, byte debugMsgSize) { ^ Msg.cpp:210:26: error: qualified-id in declaration before ‘(‘ token void Msg::publishPinArray(const byte* data, byte dataSize) { ^ Msg.cpp:219:28: error: qualified-id in declaration before ‘(‘ token void Msg::publishServoEvent( byte deviceId, byte eventType, int currentPos, int targetPos) { ^ Msg.cpp:231:28: error: qualified-id in declaration before ‘(‘ token void Msg::publishSerialData( byte deviceId, const byte* data, byte dataSize) { ^ Msg.cpp:241:38: error: qualified-id in declaration before ‘(‘ token void Msg::publishUltrasonicSensorData( byte deviceId, int echoTime) { ^ Msg.cpp:252:25: error: qualified-id in declaration before ‘(‘ token void Msg::processCommand() { ^ sketch\LinkedList.cpp: In member function ‘ListNode* LinkedList::getNode(int)’: LinkedList.cpp:75:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:96:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:128:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:161:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:199:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:211:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:214:1: error: expected ‘}’ at end of input } ^ In file included from sketch\LinkedList.h:72:0, from C:\mrl\myrobotlab.1.0.2693.16\resource\Arduino\MrlComm\MrlComm.ino:52: sketch\LinkedList.cpp: In member function ‘ListNode* LinkedList::getNode(int)’: LinkedList.cpp:75:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:96:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:128:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:161:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:199:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:211:1: error: a template declaration cannot appear at block scope template ^ In file included from sketch\MrlSerialRelay.h:5:0, from sketch\MrlComm.h:5, from C:\mrl\myrobotlab.1.0.2693.16\resource\Arduino\MrlComm\MrlComm.ino:53: Device.h:36:5: error: ‘Msg’ does not name a type Msg* msg; // Msg is the generated interface for all communication ^ MrlComm:67:16: error: a function-definition is not allowed here before ‘{‘ token void setup() { ^ MrlComm:80:15: error: a function-definition is not allowed here before ‘{‘ token void loop() { ^ MrlComm:93:3: error: expected ‘}’ at end of input } // end of big loop ^ In file included from sketch\LinkedList.h:72:0, from sketch\MrlComm.cpp:10: sketch\LinkedList.cpp: In member function ‘ListNode* LinkedList::getNode(int)’: LinkedList.cpp:75:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:96:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:128:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:161:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:199:1: error: a template declaration cannot appear at block scope template ^ LinkedList.cpp:211:1: error: a template declaration cannot appear at block scope template ^ MrlComm.cpp:29:20: error: expected ‘;’ before ‘{‘ token MrlComm::MrlComm() { ^ MrlComm.cpp:34:21: error: expected ‘;’ before ‘{‘ token MrlComm::~MrlComm() { ^ MrlComm.cpp:39:24: error: qualified-id in declaration before ‘(‘ token int MrlComm::getFreeRam() { ^ MrlComm.cpp:55:27: error: qualified-id in declaration before ‘(‘ token Device* MrlComm::getDevice(int id) { ^ MrlComm.cpp:55:28: error: expected primary-expression before ‘int’ Device* MrlComm::getDevice(int id) { ^ MrlComm.cpp:552:2: error: expected ‘}’ at end of input } ^ Msg.cpp:769:1: error: expected ‘}’ at end of input } ^ exit status 1 a template declaration cannot appear at block scope
Hello, Probably a too recent version of the Arduino IDE, specially if you are using Windows 7. Try with version 1.6 or 1.7
Thanks Gael I will try and let you know if it worked.
Hello Gael I have now tried the IDE 1.6.8 and 1.6.10 but without success. I still get the error messages. I am definitely doing something wrong. It does not komplitiert the MRLComm.ino code. Would love to continue the project because I now have the head ready and wanted to try it out.
Hi guys Found the error. Wrongly placed the mrl folder and so the Arduino IDE could not komplitieren. Small error with great effect