如何设置NetBeans IDE的pkg配置--cflags --libs GTK + -2.0? [英] How to set NetBeans IDE pkg-config --cflags --libs gtk+-2.0?

查看:371
本文介绍了如何设置NetBeans IDE的pkg配置--cflags --libs GTK + -2.0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何特别是在NetBeans IDE中应用此?我曾尝试包括-lgtk + -2.0或同一行额外的选择,但它总是展示
GCC:错误:GTK + -2.0:没有这样的文件或目录

如果我做这样的手工它的工作原理。但我想在IDE的方式来应用它:

  GCC $(pkg配置--cflags --libs GTK + -2.0更多)-o主要的main.c


解决方案

在项目属性 - >建设 - > C编译器,你可以设置为其他选项

  $$(pkg配置--cflags --libs GTK + -2.0更多)

注意双$,否则NetBeans将像对待自己的参数之一。

好像你还是会需要包括附加包含目录(例如/usr/include/gtk+-2.0)手,虽然 - 常规 - >包含目录没有让你指定一个外壳前pression进行评估。它不会停止编译,但它刚刚使IDE无法找到头,从而给你code援助。

Does anyone know how to apply this in specifically in NetBeans IDE? I have tried to include -lgtk+-2.0 or same line as additional option but always it shows gcc: error: gtk+-2.0: No such file or directory

If i do like this manually it works. But i want to apply it in IDE way:

gcc $(pkg-config --cflags --libs gtk+-2.0 more) -o main main.c

解决方案

In Project Properties -> Build -> C Compiler, you can set as 'Additional Options'

$$(pkg-config --cflags --libs gtk+-2.0 more)

note the double-$, otherwise NetBeans will treat it like one of its own parameters.

It seems like you'd still need to include the additional include directory (e.g. /usr/include/gtk+-2.0) by hand, though -- General->Include Directories does not let you specify a shell expression to be evaluated. It won't stop the compilation, but it'd just make the IDE not be able to find the headers and thus give you code assistance.

这篇关于如何设置NetBeans IDE的pkg配置--cflags --libs GTK + -2.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆