gonum / hdf5

hdf5 is a wrapper for the HDF5 library
BSD 3-Clause "New" or "Revised" License
131 stars 33 forks source link

Support install on raspbian #41

Closed happydig closed 5 years ago

happydig commented 5 years ago

On raspbian, hdf5.h and libhdf5_hl.so is under different path from Ubuntu.

// Copyright ©2017 The Gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style 
// license that can be found in the LICENSE file.

package hdf5                                                                    

// #cgo LDFLAGS: -lhdf5 -lhdf5_hl
// #cgo darwin CFLAGS: -I/usr/local/include
// #cgo darwin LDFLAGS: -L/usr/local/lib
// #cgo linux CFLAGS: -I/usr/local/include, -I/usr/lib/x86_64-linux-gnu/hdf5/serial/include
// #cgo linux LDFLAGS: -L/usr/local/lib, -L/usr/lib/x86_64-linux-gnu/hdf5/serial/
// #cgo linux arm CFLAGS: -I/usr/local/include, -I/usr/lib/arm-linux-gnueabihf/hdf5/serial/include/
// #cgo linux arm LDFLAGS: -L/usr/local/lib, -L/usr/lib/arm-linux-gnueabihf/hdf5/serial/
// #include "hdf5.h"
import "C"           
happydig commented 5 years ago

pull request as #42 .