Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics

OSD_MAllocHook.cxx fails to compile with "atol not found error"

OSD_MAllocHook.cxx fails to compile with "atol not found error"
Alex G. 2011/09/07 04:05
This happens with gcc 4.6.0 for me.
atol is defined in <stdlib.h>, which is not included in OSD_MAllocHook.cxx or its headers. This small patch makes that inclusion.

diff -upr OpenCASCADE-6.5.1.orig/ros/src/OSD/OSD_MAllocHook.cxx OpenCASCADE-6.5.1/ros/src/OSD/OSD_MAllocHook.cxx
--- OpenCASCADE-6.5.1.orig/ros/src/OSD/OSD_MAllocHook.cxx     2011-05-19 06:24:52.000000000 -0500
+++ OpenCASCADE-6.5.1/ros/src/OSD/OSD_MAllocHook.cxx     2011-09-06 20:19:40.087027436 -0500
@@ -4,6 +4,7 @@
// Copyright:     Open CASCADE S.A.S. 2011

#include <OSD_MAllocHook.hxx>
+#include <stdlib.h>

#ifndef WNT
#if !defined __STDC_LIMIT_MACROS
Richard Shaw 2011/11/03 20:10
Thanks! I ran across the same problem but I had tried adding the include in the .hxx instead of cxx... Maybe it's time for me to take a C programming class!

Latest news
  • Open CASCADE CAD Assistant for iOS platform is available!
  • Open CASCADE Technology 6.9.0 is available for download!
  • JT Assistant for Android

  • © OPEN CASCADE 2000 - 2015  |  Search  |  Contacts   |  Site map