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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

android - Keyboard hides my half of edit-text and button below it even in scroll view -