我想用cgo运行GraphicsMagick。
/*
#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;
}
*/然后我运行'go install',它说:
# pkg-config --cflags GraphicsMagick-config
Package GraphicsMagick-config was not found in the pkg-config search path.
Perhaps you should add the directory containing `GraphicsMagick-config.pc'
to the PKG_CONFIG_PATH environment variable
No package 'GraphicsMagick-config' found
exit status 1但我在shell中运行'pkg-config GraphicsMagick-config‘就可以了。
发布于 2013-03-13 22:03:01
GraphicsMagick-config脚本是一个单独的程序,而不是pkg-config资源,它解释了这个问题。
此外,使用非选项参数运行pkg-config似乎会失败,但不会打印错误消息,这可能会让您感到困惑。
但是,除了这个脚本之外,该库还为pkg- GraphicsMagick.pc安装了一个配置数据文件。因此,您应该能够使用以下命令运行代码:
#cgo pkg-config: GraphicsMagickhttps://stackoverflow.com/questions/15382325
复制相似问题