Hello Landon,

Have you tried included the header file for the SD interface?  That is mfhdf.h. 
 When you use the SD interface, you'll need mfhdf.h, which includes hdf.h.  For 
all the other interfaces, you'll only need to include hdf.h.


From: Hdf-forum <hdf-forum-boun...@lists.hdfgroup.org> on behalf of Landon 
Clipp <cli...@illinois.edu>
Sent: Saturday, October 15, 2016 11:28 PM
To: HDF Users Discussion List
Subject: [Hdf-forum] Problem with include files when compiling HDF4 program

Hello everyone,

I'm trying to compile a program that uses the HDF4 libraries. I installed HDF4 
on my computer in /usr/local/ and I have confirmed that all of the necessary 
scripts, include files and libraries have been installed and that all 
environment variables are set correctly. I created a Makefile that compiles my 
two C files into object files and then links them together. When I compile the 
first C file, "readHDFfuncs.c", the compiler tells me that all of the HDF4 
functions being called have not been declared. This should not be happening 
because my h4cc compiler is correctly including the proper directory.

I set the h4cc commands to -echo and have traced the compilation execution. 
Everything seems to be correct, however for some reason the function 
declarations are not getting through.

I have created a github to show you the 

Included is the output of my make command (which, remember, includes the -echo 
option for h4cc), the Makefile itself, my two C files, a header file, and the 
contents of my include directory. I really hate dropping all of this on people 
and asking for a solution but I have spent a lot of time trying to figure this 
out and I would greatly appreciate it if someone could point out anything they 
see. Thanks!

Hdf-forum is for HDF software users discussion.
Twitter: https://twitter.com/hdf5

Reply via email to