AnsweredAssumed Answered

library error with C++ application

Question asked by OldNick on Jul 28, 2011
Latest reply on Aug 1, 2011 by OldNick

Sorry if I have already posted this, but I am gettting hopelessly confused...just trying to add a simple C++ file to one of the standard MQX-towerK40 examples (hello.ewp)


IAR ewarm 6.2, project settings exactly as supplied, with one change - compiler c or c++ "Auto" (based on extension)

C++ version is EEC++


#include <iostream>
#include <mqx.h>
#include <bsp.h>

void printstring(void)


The simple act of adding this file to the build (even if you never call printstring() !) causes the linker to warn about there being no heap.


If I add the operator overloads to the cpp file in the same way that the PEG++ librar build uses (which DOES work with MQX), the project compiles and links with 0 errors 0 warnings.


But the debugger never gets to main.:robotmad:

Does anybody know what is going on?


PS> There are a bunch of similar questions in th ancient history on this forum, but I haven't seen that anybody had it answered yet.  It would be nice if there was a FAQ on how to make C++ apps work with MQX, or at least make it clear that it can't be done.