Translate a Resource Manager in C to C++

Good day to all!

I need to compile some files using g++, but the problem is that I have a Resource Manager (RM) in one of those files, and I couldn’t compile because the RM is written in C, not in C++. I’m using the example from the Programmers Guide (chapter 4). Does somebody know how to modify that RM and translate it in a C++ application?

I could compile some files using g++ and the RM using gcc and then I could call the RM using SPAWN, but that’s not my idea, because my main application read an XML file, then takes the information from the CML to create some classes and objects; after that the RM should be called to create all necessary devices specified in the XML file (/dev/example1, /dev/example2, etc). After all devices are created, another application should make some reads to the devices (/dev/example1), and the devices should read some objects created by the first application (g++) and return the information to the second application.

I don’t know if I’m clear, but my english is not good enough… if somebody wants more details please tell me…

Thank you very much and best regards!

Hi, it’s me again…
I have solved by my myself… I have replaced the fn min() by the macro __min()

/* The min() function is for C programs only. For C+ and C++ /
/
programs, use the max() or min() macros. */

and there is another function that I have commented :

// memset(&resmgr attr, 0, sizeof resmgr attr);

Is working ok now…!!
Any comments, are wellcome!
Bye
Bye

memset should do fine in c++ too i think