Quantcast

Problem with include files when compiling HDF4 program

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem with include files when compiling HDF4 program

Landon Clipp
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 files.

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!

Regards,
Landon

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with include files when compiling HDF4 program

Binh-Minh Ribler

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.


Binh-Minh



From: Hdf-forum <[hidden email]> on behalf of Landon Clipp <[hidden email]>
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 files.

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!

Regards,
Landon

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with include files when compiling HDF4 program

Landon Clipp
Hello Binh-Minh,

That might be the issue and that would make sense. I will try this next time I'm working on the program. Thanks!

Regards,
Landon

On Sun, Oct 16, 2016 at 12:55 AM, Binh-Minh Ribler <[hidden email]> wrote:

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.


Binh-Minh



From: Hdf-forum <[hidden email]> on behalf of Landon Clipp <[hidden email]>
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 files.

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!

Regards,
Landon

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with include files when compiling HDF4 program

Binh-Minh Ribler

You're welcome, Landon.  We'll try again, if that doesn't do it.


Binh-Minh



From: Hdf-forum <[hidden email]> on behalf of Landon Clipp <[hidden email]>
Sent: Tuesday, October 18, 2016 1:13 PM
To: HDF Users Discussion List
Subject: Re: [Hdf-forum] Problem with include files when compiling HDF4 program
 
Hello Binh-Minh,

That might be the issue and that would make sense. I will try this next time I'm working on the program. Thanks!

Regards,
Landon

On Sun, Oct 16, 2016 at 12:55 AM, Binh-Minh Ribler <[hidden email]> wrote:

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.


Binh-Minh



From: Hdf-forum <[hidden email]> on behalf of Landon Clipp <[hidden email]>
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 files.

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!

Regards,
Landon

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Loading...