Tag: eclipse cdt

如何将库添加到Eclipse项目

我试图添加一个库到Eclipse伽利略,它不会工作。 库:gdi32.lib – >在MinGW:libgdi32.a中 无论我尝试什么,都行不通。 任何人都可以正确地告诉我要进入哪里,完成这个? 细节: 我有函数调用: wndclassex.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); …导致错误: WinMain.o: In function `WinMain': Z:/mtsts_workspace/MTSTS/Debug/../WinMain.c:29: undefined reference to `GetStockObject@4' 我有这个函数调用: TextOut(hdc, 0, 0, TEXT("Hello World!"), 12); …导致错误: WinMain.o: In function `WndProc': Z:/mtsts_workspace/MTSTS/Debug/../WinMain.c:88: undefined reference to `TextOutA@20'

启动失败。 找不到二进制文件。 Eclipse Helios上的CDT

我在Ubuntu 10.04上使用Eclipse Helios,并且试图在其上安装CDT插件。 我从这里下载。 然后我去安装新软件并select压缩文件( 我不提取它,只需select压缩文件 )。 它的好,安装,一切工作正常,它显示可选function, 等等等等等等 。 然后我创build一个新的HelloWorld项目。 当我尝试运行它时,它显示一个错误,并说: 启动失败。 找不到二进制文件。 任何人都可以解释我如何解决它? 谢谢。

如何在Eclipse CDT中为C ++ STL对象启用gdb漂亮打印?

我试图在eclipse cdt中为STL对象添加漂亮的打印。 我试图按照这里描述的步骤: http://sourceware.org/gdb/wiki/STLSupport 我检查了python文件夹,但我似乎无法完成这项工作… 我创build了一个gdbinit,并select了我的debuggingconfiguration,但每当我尝试开始debugging,我得到以下错误: Error while executing Python code. !STACK 0 java.lang.Exception: /home/lizardking/workspace/eu.sofia.kpi.cpp.x86.testapp/.gdbinit:6: Error in sourced command file: Error while executing Python code. at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:824) at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:662) 如果我尝试在python shell中执行gdbinit的内容,我得到这个错误: Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. import sys sys.path.insert(0, '/home/Documents/python') […]

在Eclipse CDT(Juno / Kepler / Luna)索引器中启用C ++ 11

如何在Juno / Kepler / Luna的Eclipse CDT索引器上启用对新C ++标准的支持?

Eclipse CDT:Symbol'cout'无法parsing

错误如上。 我有什么应该是所有必要的文件包括在eclipse项目中: /usr/include/c++/4.6 /usr/include /usr/include/linux /usr/local/include 等等 我试过std::cout和using namespace std; 但它仍然说没有解决。 我已经导入了iostream和cstdlib 。 另外,我在Ubuntu 12.04上使用Eclipse 3.7.2。 代码片段: #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include "XPLMDisplay.h" #include "XPLMGraphics.h" int XPluginStart(char * outName, char * outSig, char * outDesc) { /* … */ std::cout << "test" << std::endl; /* … */ } 使用命名空间std; 更新:我已经从现有的代码创build了eclipse项目。 创build一个新的c […]

GCC C ++链接器错误:未定义的引用'XXX的虚拟表',未定义的引用'ClassName :: ClassName()'

我使用Eclipse-CDT在Ubuntu x64上设置了一个C ++项目。 我基本上正在做一个你好的世界,并链接到商业第三方图书馆。 我已经包含链接到他们的库的头文件,但我仍然得到链接器错误。 除了显而易见的情况之外,是否还有其他一些可能的问题(例如,我确信我链接到了正确的库)。 有没有办法确认我连接的静态库是64位? 有没有办法确认图书馆有我期待的类(和方法)? Eclipse说: build立目标:LinkProblem 调用:GCC C ++链接器 g ++ -L / home / notroot / workspace / somelib-3 / somelib / target / bin -o“LinkProblem”./src/LinkProblem.o -lsomelib1 -lpthread -lsomelib2 -lsomelib3 ./src/LinkProblem.o:在函数`main'中: /home/notroot/workspace/LinkProblem/Debug/../src/LinkProblem.cpp:17:对“SomeClass :: close()”的未定义引用 ./src/LinkProblem.o:在函数SomeOtherClass中: /home/notroot/workspace/somelib-3/somelib/include/sql/somefile.h:148:对SomeClass :: SomeClass()的未定义引用 /home/notroot/workspace/somelib-3/somelib/include/sql/somefile.h:148:未定义对“SomeOtherClass的vtable”的引用 /home/notroot/workspace/somelib-3/somelib/include/sql/somefile.h:151:对SomeClass ::〜SomeClass()的未定义引用 ./src/LinkProblem.o:在函数`〜SomeOtherClass'中: /home/notroot/workspace/somelib-3/somelib/include/sql/somefile.h:140:未定义对“SomeOtherClass的vtable”的引用 /home/notroot/workspace/somelib-3/somelib/include/sql/somefile.h:140:对SomeClass ::〜SomeClass()的未定义引用 /home/notroot/workspace/somelib-3/somelib/include/sql/somefile.h:140:对SomeClass ::〜SomeClass()的未定义引用 collect2:ld返回1退出状态 make:*** [LinkProblem]错误1

Eclipse CDT C ++ 11 / C ++ 0x支持

Eclipse 3.7.1 CDT 1.4.1 GCC 4.6.2 这是一个C ++ 11代码的例子: auto text = std::unique_ptr<char[]>(new char[len]); Eclipse编辑器抱怨: Function 'unique_ptr' could not be resolved Makefile编译工作正常。 如何让Eclipse停止抱怨这类错误?

未定义引用'WinMain @ 16'

当我尝试使用Eclipse CDT构build程序时,我得到以下内容: /mingw/lib/libmingw32.a(main.o):main.c:(.text+0x106):对WinMain @ 16的未定义引用 这是为什么? 而且,我该如何解决这个问题呢?