草庐IT

missing-symbols

全部标签

c++ - 错误 LNK2019 : unresolved external symbol referenced in function main

我正在尝试用C++运行我的简单汇编代码。我只有两个文件“.cpp”文件和“.asm”文件。编译时出现错误(见下文)。如果有人能提供帮助,我将不胜感激...:)这是我的“main.cpp”文件#includeusingnamespacestd;extern"C"intGetValueFromASM();intmain(intargc,char*argv[]){cout我还有一个简单的“asm.asm”文件.codeGetValueFromASMprocmovrax,3254retGetValueFromASMendpend尝试构建时出现此错误:1>main.obj:errorLNK201

c++ - GLEW 和 glfw 编译错误 : undefined reference to symbol 'XConvertSelection'

我正在尝试编译这段代码:#include#include#include#includeGLFWwindow*window;#includeusingnamespaceglm;intmain(void){//InitialiseGLFWif(!glfwInit()){fprintf(stderr,"FailedtoinitializeGLFW\n");return-1;}glfwWindowHint(GLFW_SAMPLES,4);glfwWindowHint(GLFW_RESIZABLE,GL_FALSE);glfwWindowHint(GLFW_CONTEXT_VERSION_MA

c++ - Unresolved external symbol 链接器错误 (C++)

我正在尝试为我的项目之一开发抽象设计模式代码,如下所示。但是,我无法编译代码......给出了一些编译错误(如“未解析的外部符号”public:virtualvoid__thiscallXsecs::draw_lines(double,double)"(?draw_lines@Xsecs@@UAEXNN@Z)")..任何人都可以帮我解决这个问题......#include"stdafx.h"#include#include#include"Xsecs.h"usingnamespacestd;//ProductclassclassXsecs{public:virtualvoiddraw_

c++ - #defining a symbol to nothing 的成语叫什么名字?

如果我看到代码行#defineIO_API__declspec(dllexport)我会告诉我的同事“IO_API被定义为__declspec(dllexport)”。但是,如果我看到这行代码#defineIO_API我不确定我会简短而明确地告诉我的同事们什么:任何描述都可能会有些牵强附会。有没有共同的描述符?编辑:我不是在这里寻找用例,只是成语的名称。 最佳答案 在这里我们只是说ThemacroIO_APIexpandstonothing.或ThemacroIO_APIisempty.这确实很主观,但我认为前者导致的困惑最少。

python - SWIG Python undefined symbol 错误

我正在尝试使用SWIG创建一个*.so文件以便在Python中进一步使用,但有些东西不起作用。我有两个文件:数据收集器.h#include#include#include#include"gnublin.h"#includeclassdataGatherer{private:intthreshold;inttimeThreshold;intdata[4096];boolrunning;gnublin_spi*spiDevice;pthread_tspiThread;void*params;public:dataGatherer(void);dataGatherer(int,int);v

c++ - 打开CV : unresolved external symbol

我知道这个问题是alloverplace,但将库目录添加到项目属性的魔术棒对我来说仍然不起作用。我关注了tutorialforVisualStudio(2013年我在这里)和environmentvariablesetup适用于opencv3.0beta。它与测试它!部分中的代码相同。这是vs中构建输出的标题:1>------Buildstarted:Project:OpenCVTest,Configuration:DebugWin32------1>opencv_core300d.lib(matrix.obj):errorLNK2019:unresolvedexternalsymbo

c++ - C++共享库中基类的 undefined symbol 错误

我使用g++-shared...将以下代码编译为共享库:classFoo{public:Foo(){}virtual~Foo()=0;virtualintBar()=0;};classTestFoo:publicFoo{public:intBar(){return0;}};extern"C"{Foo*foo;voidinit(){//Runtimeerror:undefinedsymbol:_ZN3FooD2Evfoo=newTestFoo();//causeserror}voidcleanup(){delete(foo);}voidbar(){foo->Bar();}}重点是将我的类

c++ - 线程构造的性能成本 : missed optimisations and memory allocation

我们遇到了一种奇怪的现象,其中包含头文件会导致某些内存分配密集型工作负载的性能下降5-10%。这个头文件将一个线程池声明为一个全局变量。该线程池从未在应用程序中以任何容量(还)使用过。也就是说,除了在程序启动时创建这个静态线程池外,应用程序完全是单线程的。一旦标题被移除,性能损失就会消失。从一些研究来看,由于某些编译器优化不再可能,多线程应用程序似乎会导致一些性能损失。每当以任何形式或容量实例化与线程相关的构造时,是否有可能关闭此类优化?或者,由于在执行大量内存分配时性能损失似乎最为明显,编译器是否有可能在编译/链接阶段意识到线程构造已实例化,因此它切换到线程安全内存分配器?这发生在L

c++ - Unresolved inclusion : Eclipse Not Showing "Includes" tab under "Paths and Symbols":

我正在尝试解决Eclipse中的一些包含问题。通常我单击项目属性,然后单击“C/C++General”,然后单击“路径和符号”,然后开始添加包含目录,如下所示:但是今天,出于某种奇怪的原因,Eclipse(Juno)没有显示包含选项卡!如何恢复“包含”选项卡以便解析项目中的符号? 最佳答案 默认情况下该选项卡是隐藏的,您可以通过输入再次启用它:Windows>首选项>C/C++>属性页设置>显示“包含文件”...您可能需要重新启动Eclipse才能显示。 关于c++-Unresolved

c++ - 错误 LNK2001 : unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString &&)"

我非常想找到关于上述错误的任何信息。我正在使用visualstudio2010。当我在调试或发布中编译我的项目(32位)时,我收到以下消息:1>heterogeneous.obj:errorLNK2001:unresolvedexternalsymbol"__declspec(dllimport)public:classQString&_thiscallQString::operator=(classQString&&)"(_imp_??4QString@@QAEAAV0@$$QAV0@@Z)1>debug\nori.exe:fatalerrorLNK1120:1unresolvede