我想把gtk纳入我的健身项目。我可以手工编译,但是使用gyp,我总是会得到找不到#include <gtk/gtk.h>的错误。我见过像铬就像这样包括在内这样的其他gyp项目,但在复制方面没有成功。
谢谢你看一看!
{
'variables': {
'pkg-config': 'pkg-config'
},
'targets': [
{
'target_name': 'application',
'type': 'executable',
'sources': [
'src/main_linux.cc',
],
},
],
'conditions': [
['OS=="linux"', {
'direct_dependent_settings': {
'cflags': [
'<!@(<(pkg-config) --cflags gtk+-2.0)',
],
},
'link_settings': {
'ldflags': [
'<!@(<(pkg-config) --libs-only-other gtk+-2.0)',
],
'libraries': [
'<!@(<(pkg-config) --libs-only-l gtk+-2.0)',
],
},
}],
],
}发布于 2014-04-30 02:23:01
下面是我现在使用的工作文件:
{
'variables': {
'pkg-config': 'pkg-config'
},
'conditions': [
['OS=="linux"', {
'targets': [
{
'target_name': 'trackbox',
'type': 'executable',
'sources': [
'src/main_linux.cc',
],
'cflags': [
'<!@(<(pkg-config) --cflags gtk+-2.0)',
],
'ldflags': [
'<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-2.0)',
],
'libraries': [
'<!@(<(pkg-config) --libs-only-l gtk+-2.0)',
],
},
],
}]
],
}https://stackoverflow.com/questions/23378331
复制相似问题