Library creation and use

I’m having a problem using a library of my standard code, using NET+O/S on ME 9210/CC9P-9215

I have the basics going, in that a library providing only ‘straightforward’ files links and runs OK.

The library is mostly ‘.cpp’ files, with the occasional ‘.c’ file, and a mix of ‘c’ and ‘c++’ function declarations.

The problem occurs when I move a (working) .cpp file from the main code into the library, and this file uses certain functions. Its difficult to pin down, but seems to be related to use of either malloc() or the ThreadX libraries. (I used ‘clean and rebuild’ to make sure there was no unwanted rubbish left behind).

The symptoms are that the program fails to run (and this was code that has worked, remember), either locking up on a ThreadX wait, or crashing with a NA_EXCEPTION_DATA_ABORT exception error.

I suspect there’s an option or compiler switch I’ve not set correctly somewhere.

Any suggestions?