go - cgo and pkg-config -
i want run graphicsmagick cgo.
/* #cgo pkg-config: graphicsmagick-config #include <magick/api.h> static int gm(int argc, char **argv) { int status; status = gmcommand(argc, argv); return 1-status; } */
then run 'go install', says:
# pkg-config --cflags graphicsmagick-config package graphicsmagick-config not found in pkg-config search path. perhaps should add directory containing `graphicsmagick-config.pc' pkg_config_path environment variable no package 'graphicsmagick-config' found exit status 1
but run 'pkg-config graphicsmagick-config' in shell , it's ok.
the graphicsmagick-config
script separate program rather pkg-config resource, explains problem.
also, running pkg-config non-option argument seems fail without printing error message, might have confused you.
in addition script though, library install graphicsmagick.pc
data file pkg-config. should able code running with:
#cgo pkg-config: graphicsmagick
Comments
Post a Comment