The cpu.c as I saw it beeing generated does not give the "EntryPoint" symbol a C linkage when compiled as C++. It does not help to suspend PE or to rename cpu.c to cpu.cpp, the incompatible C++ to C linkage (in respect to the name mangling) does not get solved this way.
So you to do either
- have to refer to EntryPoint using its mangled name in the prm (use disassemble to find out the exact name)
- change cpu.c (.cpp) to give EntryPoint a C linkage (by adding
#ifdef __cplusplus
extern "C"
#endif
in front of every declaration and the definition
- compile cpu.c as C code and your user modules as C++ code. Add a extern "C" gard around included PE files
extern "C" {
#include "processor expert headerfile.h"
}
Daniel