9 years, 6 months ago.

Compiler error when using a K64F

Hello MQTT Team,

I tried compiling "HelloMQTT" using a K64F without a LCD. I commented out every line in main.cpp that has to do with the LCD. There are 2 compiler errors in main.cpp as a result:

Error: Identifier "data" is undefined in "main.cpp", Line: 68, Col: 5

Error: Identifier "message" is undefined in "main.cpp", Line: 83, Col: 5

The odd thing is, if I put back the LCD stuff and rename the LCD pins to something the K64F likes (placebo pins), the program compiles without error.

//C12832 lcd(p5, p7, p6, p8, p11);   //for the original program using a LPC1768
C12832 lcd(PTE3, PTE1, PTE2, PTE4, PTE6)  //dummy pins for the K64F

...kevin

Question relating to:

Sample MQTT program - simple send and receive

Never mind - I found the issue. However, please report back with an answer so I can close this question out ...kevin

posted by Kevin Braun 07 Oct 2014

1 Answer

9 years, 6 months ago.

What was the issue?

Accepted Answer

Sam, what if I update HelloMQTT to print only to one location, either stdout, or the LCD. And you can switch to the LCD with a #define?

posted by Ian Craggs 08 Oct 2014

I failed to comment out the prior IF statement above the failing lines

...kevin

posted by Kevin Braun 08 Oct 2014