linux – 使用带有Eclipse CDT的gtkmm
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了linux – 使用带有Eclipse CDT的gtkmm,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2394字,纯文字阅读大概需要4分钟。
内容图文
我正在尝试使用Eclipse CDT编译gtkmm Simple Example,但由于某种原因它无法正常工作
我正在Mandriva Linux和GCC 4.4.3上编译它
我收到此错误,我认为这是一个链接错误:
Building target: Test
Invoking: GCC C++ Linker
g++ -L/usr/include/gtkmm-2.4 -o"Test" ./test.o
./test.o: In function `main':
test.cpp:(.text+0x39): undefined reference to `Gtk::Main::Main(int&, char**&, bool)'
test.cpp:(.text+0x43): undefined reference to `Gtk::Window::Window(Gtk::WindowType)'
test.cpp:(.text+0x4b): undefined reference to `Gtk::Main::run(Gtk::Window&)'
test.cpp:(.text+0x53): undefined reference to `Gtk::Window::~Window()'
test.cpp:(.text+0x5b): undefined reference to `Gtk::Main::~Main()'
test.cpp:(.text+0x82): undefined reference to `Gtk::Main::~Main()'
test.cpp:(.text+0x95): undefined reference to `Gtk::Window::~Window()'
./test.o: In function `global constructors keyed to main':
test.cpp:(.text+0xaf): undefined reference to `Glib::ustring::ustring(char const*)'
test.cpp:(.text+0xbe): undefined reference to `Glib::ustring::~ustring()'
test.cpp:(.text+0xd2): undefined reference to `Glib::ustring::ustring(char const*)'
test.cpp:(.text+0xe1): undefined reference to `Glib::ustring::~ustring()'
test.cpp:(.text+0xf5): undefined reference to `Glib::ustring::ustring(char const*)'
test.cpp:(.text+0x104): undefined reference to `Glib::ustring::~ustring()'
test.cpp:(.text+0x118): undefined reference to `Glib::ustring::ustring(char const*)'
test.cpp:(.text+0x127): undefined reference to `Glib::ustring::~ustring()'
test.cpp:(.text+0x13b): undefined reference to `Glib::ustring::ustring(char const*)'
test.cpp:(.text+0x14a): undefined reference to `Glib::ustring::~ustring()'
test.cpp:(.text+0x15e): undefined reference to `Glib::ustring::ustring(char const*)'
test.cpp:(.text+0x16d): undefined reference to `Glib::ustring::~ustring()'
test.cpp:(.text+0x181): undefined reference to `Glib::ustring::ustring(char const*)'
test.cpp:(.text+0x190): undefined reference to `Glib::ustring::~ustring()'
collect2: ld returned 1 exit status
make: *** [Test] Error 1
很抱歉长错误日志,但我不知道如何缩短它
解决方法:
项目属性 – > C/C++构建 – >设置
GCC C Compiler->杂项,将此字符串添加:pkg-config gtkmm-3.0 –cflags –libs into Other flags.
GCC C Linker->杂项,在链接器标志中添加此字符串:pkg-config gtkmm-3.0 –cflags –libs.
如果您使用的是gtkmm 2.4,只需将“gtkmm-3.0”替换为“gtkmm-2.4”
勾选GCC C COMPILER VERBOSE(_V)字符串.
内容总结
以上是互联网集市为您收集整理的linux – 使用带有Eclipse CDT的gtkmm全部内容,希望文章能够帮你解决linux – 使用带有Eclipse CDT的gtkmm所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。