Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#82 Build fails on recent Linux

pending
nobody
None
5
2012-02-26
2011-11-22
Martin Blais
No

Building on RHEL 6.x and Ubuntu 11.10 I have the same problem, a lot of errors of this type:

In file included from ../FieldTypes.h:29:0,
from ../FieldConvertors.h:25,
from ../Field.h:32,
from ../FieldMap.h:29,
from ../Message.h:29,
from ../MessageStore.h:29,
from ../FileStore.h:29,
from FileStoreFactoryTestCase.cpp:28:
../Utility.h:187:12: error: ‘std::abort’ has not been declared
../Utility.h:189:12: error: ‘std::atoi’ has not been declared
../Utility.h:190:12: error: ‘std::atol’ has not been declared
../Utility.h:191:12: error: ‘std::atof’ has not been declared
../Utility.h:196:12: error: ‘std::abs’ has not been declared
../Utility.h:197:12: error: ‘std::labs’ has not been declared
../Utility.h:200:12: error: ‘std::exit’ has not been declared
../Utility.h:201:12: error: ‘std::strtod’ has not been declared
../Utility.h:202:12: error: ‘std::strtol’ has not been declared

Adding

#include <cstdlib>

near the top of src/C++/Utility.h fixes the issue.
Thanks,

Discussion

  • Oren Miller
    Oren Miller
    2012-02-26

    • status: open --> pending
     
  • Oren Miller
    Oren Miller
    2012-02-26

    Apparently <string> often but not always pulls this in. I've added an explicit include.