Closed dkirkby closed 8 years ago
Compiling with the HDF5 option results in undefined symbols (on OS X with clang):
gcc -Wall -O3 -D_LONGIDS -D_DEBUG -D_SPREC -D_HAVE_HDF5 -D_HAVE_FITS -I./src src/common.o src/cosmo_mad.o src/cosmo.o src/fourier.o src/grid_tools.o src/io.o src/main.c -o CoLoRe -lgsl -lgslcblas -lfftw3f -lhdf5 -lhdf5_hl -lcfitsio -lm Undefined symbols for architecture x86_64: "_compress2", referenced from: _H5Z_filter_deflate in libhdf5.a(H5Zdeflate.o) (maybe you meant: _compress2file_from_mem, _compress2mem_from_mem ) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [CoLoRe] Error 1
It looks like this change to the Makefile fixes it:
LIB_ALL += -lhdf5 -lhdf5_hl -lz
Thanks a lot for noticing! I never had this problem on linux. This should be fixed by your pull request, right? I'll close this then.
Compiling with the HDF5 option results in undefined symbols (on OS X with clang):
It looks like this change to the Makefile fixes it: