[Paraview] XdmfH5Driver.cxx missing stdlib.h include?

Berk Geveci berk.geveci at kitware.com
Wed Jul 9 16:45:21 EDT 2008


Actually, the code was originally written in C++.  A reorganization in
the gcc/g++ headers caused this failure. In the past, stdlib.h was
included indirectly by other system headers. This is no longer the
case.

-berk

On Wed, Jul 9, 2008 at 2:52 PM, John Doe <ufnoise at gmail.com> wrote:
> In C++ you need to forward declare all functions being called.  This
> file looks like it was originally written in C, and that language
> allows you to call functions you haven't declared.
>
> cstdlib is more appropriate for modern C++ compilers, but stdlib.h
> would work just as well.
>
> Regards,
>
> Juan
>
> On Wed, Jul 9, 2008 at 1:43 PM, Russell Thomason <rthomas at sandia.gov> wrote:
>> I was building the latest source today from scratch and got this error.
>> I fixed it by including stdlib.h. Has anyone else had to do this?
>>
>> [ 31%] Building CXX object
>> Utilities/Xdmf2/libsrc/CMakeFiles/Xdmf.dir/XdmfH5Driver.o
>> /home/rthomas/code/paraview/ParaView3/Utilities/Xdmf2/libsrc/XdmfH5Driver.cxx: In function 'void* H5FD_dsm_fapl_get(H5FD_t*)':
>> /home/rthomas/code/paraview/ParaView3/Utilities/Xdmf2/libsrc/XdmfH5Driver.cxx:360: error: 'calloc' was not declared in this scope
>> /home/rthomas/code/paraview/ParaView3/Utilities/Xdmf2/libsrc/XdmfH5Driver.cxx: In function 'H5FD_t* H5FD_dsm_open(const char*, unsigned int, hid_t, haddr_t)':
>> /home/rthomas/code/paraview/ParaView3/Utilities/Xdmf2/libsrc/XdmfH5Driver.cxx:413: error: 'calloc' was not declared in this scope
>> /home/rthomas/code/paraview/ParaView3/Utilities/Xdmf2/libsrc/XdmfH5Driver.cxx:443: error: 'free' was not declared in this scope
>> /home/rthomas/code/paraview/ParaView3/Utilities/Xdmf2/libsrc/XdmfH5Driver.cxx: In function 'herr_t H5FD_dsm_close(H5FD_t*)':
>> /home/rthomas/code/paraview/ParaView3/Utilities/Xdmf2/libsrc/XdmfH5Driver.cxx:535: error: 'free' was not declared in this scope
>> /home/rthomas/code/paraview/ParaView3/Utilities/Xdmf2/libsrc/XdmfH5Driver.cxx:537: error: 'free' was not declared in this scope
>> make[2]: *** [Utilities/Xdmf2/libsrc/CMakeFiles/Xdmf.dir/XdmfH5Driver.o]
>> Error 1
>> make[1]: *** [Utilities/Xdmf2/libsrc/CMakeFiles/Xdmf.dir/all] Error 2
>> make: *** [all] Error 2
>>
>>
>>
>> _______________________________________________
>> ParaView mailing list
>> ParaView at paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
>>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list