Error in OSD_MAllocHook.cxx during compilation

Hello,

I would like to install OpenCascade on my System (Ubuntu 10.10). I downloaded the tar.gz archive, ./configure with the flags mentioned in the README.txt exited normally, but during the compilation with make I get the following errors:

../../../src/OSD/OSD_MAllocHook.cxx:283: error: 'atol' was not declared in this scope
../../../src/OSD/OSD_MAllocHook.cxx:346: warning: unknown conversion type character 'I' in format
../../../src/OSD/OSD_MAllocHook.cxx:346: warning: unknown conversion type character 'I' in format
../../../src/OSD/OSD_MAllocHook.cxx:346: warning: unknown conversion type character 'I' in format
../../../src/OSD/OSD_MAllocHook.cxx:360: warning: unknown conversion type character 'I' in format
../../../src/OSD/OSD_MAllocHook.cxx:360: warning: unknown conversion type character 'I' in format
../../../src/OSD/OSD_MAllocHook.cxx:360: warning: unknown conversion type character 'I' in format
../../../src/OSD/OSD_MAllocHook.cxx: In member function 'Standard_Boolean OSD_MAllocHook::CollectBySize::MakeReport(const char*)':
../../../src/OSD/OSD_MAllocHook.cxx:483: warning: unknown conversion type character 'I' in format
../../../src/OSD/OSD_MAllocHook.cxx:483: warning: unknown conversion type character 'I' in format
../../../src/OSD/OSD_MAllocHook.cxx:483: warning: unknown conversion type character 'I' in format
../../../src/OSD/OSD_MAllocHook.cxx:492: warning: unknown conversion type character 'I' in format
../../../src/OSD/OSD_MAllocHook.cxx:492: warning: unknown conversion type character 'I' in format
../../../src/OSD/OSD_MAllocHook.cxx:492: warning: unknown conversion type character 'I' in format

Does anybody know this error? Any hints how to solve it?

Thanks in advance for your help!

Greetings
Chris

axw's picture

hi,
i added the following line
#include

to the file ros/src/OSD/OSD_MAllocHook.cxx

and at least it went on compiling, i'm not sure if adding this include is a good idea, so do this at your own risk...

axw

Luis Gabriel Ventosa Ventosa's picture

Yes, same problem under Ubuntu 10.10, adding the reference to cstdlib solves compilation problem.
Please anybody confirm if that is the correct solution.
Greetings.

Franz Engel's picture

I had the same problem with Ubuntu Lucid, and adding the cstdlib into the .cxx file solved the problem.