Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gtk 使用pkg-config-gyp_Gtk_Gyp - Fatal编程技术网

Gtk 使用pkg-config-gyp

Gtk 使用pkg-config-gyp,gtk,gyp,Gtk,Gyp,我正试图在我的gyp项目中加入gtk。我可以手工编译,但使用gyp时,我总是会遇到无法找到#include的错误。我见过其他类似的gyp项目,但在复制方面没有成功 谢谢你看 { 'variables': { 'pkg-config': 'pkg-config' }, 'targets': [ { 'target_name': 'application', 'type': 'executabl

我正试图在我的gyp项目中加入gtk。我可以手工编译,但使用gyp时,我总是会遇到无法找到
#include
的错误。我见过其他类似的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)',
                ],
            },
        }],
    ],
}
{
“变量”:{
“打包配置”:“打包配置”
},
“目标”:[
{
“目标名称”:“应用程序”,
“类型”:“可执行文件”,
“来源”:[
“src/main_linux.cc”,
],
},
],
“条件”:[
['OS==“linux”'{
“直接依赖设置”:{
“cflags”:[

“这是我现在使用的工作文件:

 {
        '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)',
                    ],
                },
            ],
            }]
        ],
    }
{
“变量”:{
“打包配置”:“打包配置”
},
“条件”:[
['OS==“linux”'{
“目标”:[
{
'target_name':'trackbox',
“类型”:“可执行文件”,
“来源”:[
“src/main_linux.cc”,
],
“cflags”:[
'