Using HDF5 in xcode

Hello everybody,

I’m trying to use the HDF5 libary for a project in OF.
I would like to end up with an addon wrapping the main functionalities (write/read, create dataset, create group… )

I’m stuck on trying to get the libary working in OF (I’m in latest Xcode, latest OF)
So far I have downloaded the binary files here:
http://www.hdfgroup.org/HDF5/release/obtain5.html

And tried the platform:
Linux 2.6 (32-bit)
Compilers: gcc, g++, gfortran 4.1.2

These are the errors i get:

ld: warning: ignoring file openFrameworks/addons/ofxHDF5/libs/HDF5Lib/lib/osx/libhdf5_cpp.a, file was built for archive which is not the architecture being linked (i386): openFrameworks/addons/ofxHDF5/libs/HDF5Lib/lib/osx/libhdf5_cpp.a
Undefined symbols for architecture i386:
  "vtable for H5::DataSpaceIException", referenced from:
	H5::DataSpaceIException::DataSpaceIException(H5::DataSpaceIException const&) in ofxHDF5.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

I don’t understand why it is ignoring the lib file… do i have to compile the entire library to get the right architecture?

——

I have little experience with compilers and the process of creating addons… I haven’t found much documentation on how to deal with all the compiler errors I’m getting… but I really would like to know how to do that.

To me, the task of creating an addon wrapping some library it seems like a big wall, really hard to climb. I’m sure that there are many people in my situation. Where they can run OF and addons but once they want something else they find the same wall.

I would like to share my experience so that others can find some answers here.

can you really use linux binaries on mac os? I think you need MacOS binaries. I found some links here but don’t know if those are correct.

1 Like

Hey @bilderbuchi thank you very much for your help!
I’m not sure if i could use linux bins but i didn’t find anything better.
Your link looks very promising!
which one would you try first? this one?

Mac OS X 10.7.0 (Intel 32-bit)
Compilers: gcc, g++ 4.2.1,
gfortran 4.4.0

Do you think it might work with LLVM? i understand that that should not be a problem… am I wrong?

OMG it worked!!!
Now the fun begins!!
Thanks again!!
now I see my problem was very stupid…