简体   繁体   English

在带有C ++的Eclipse中使用gtk3

[英]Use gtk3 in eclipse with c++

im learning c++ in combination with the gtk3 gui libary at the moment. 我目前正在结合gtk3 gui库学习c ++。 But i don't know how to include it correctly. 但是我不知道如何正确地包含它。 I am using eclipse with the cdt. 我在cdt中使用eclipse。 After creating a project i can include it in the properties menu but if i do so i get the warning/error undefined reference on ... (in each line with a gtk3 function). 创建项目后,我可以将其包含在属性菜单中,但是如果这样做,我会在...(在带有gtk3函数的每一行中)上得到警告/错误未定义的引用。 A can solve this error if i just use the pkg-config plugin but i can't create any c or c++ project if it is installed (NullPointerException). 如果我只使用pkg-config插件,但可以解决此错误,但如果安装了它,则无法创建任何c或c ++项目(NullPointerException)。

Does anybody knows how to solve one of this problems? 有人知道如何解决其中一个问题吗?

Thanks in advance! 提前致谢!

have a look at gnome-builder which is tailored to the cration of Gtk+ applications in C/C++/Python. 看一下gnome-builder ,它是为C / C ++ / Python中的Gtk +应用程序量身定制的。

If you want to set up eclipse with gtk that is indeed possible, but you need to take care of the include paths. 如果您想使用gtk设置eclipse,确实可以,但是需要注意include路径。 I'd recommend to use the output of pkg-config and paste that into the linker fields of your project, same with includes. 我建议使用pkg-config的输出,并将其粘贴到项目的链接器字段中,包括include。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM