草庐IT

symbolication

全部标签

c++ - ld : duplicate symbol

我有rand.cpp和rand.hpp文件,并且有rand_unif()函数。我在sim_engine.hpp文件中包含了rand.hpp文件。在main.cpp文件中,我包含了sim_engine.hpp文件。如果我运行makefile然后我得到这个错误ld:duplicatesymbolrand_unif()insim_engine.oandmain.oforarchitecturex86_64collect2:ldreturned1exitstatussim_engine.hpp是唯一包含rand.hpp的地方。main.cpp不包含rand.hpp但包含sim_engine.h

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

我目前在编译代码时遇到以下错误:errorLNK2019:unresolvedexternalsymbol"public:void__thiscallAgent::printSelf(void)"(?printSelf@Agent@@QAEXXZ)referencedinfunction"public:void__thiscallWorld::processMouse(int,int,int,int)"(?processMouse@World@@QAEXHHHH@Z)World.obj这是我的代码代理.h:classAgent{public:Agent();voidprintSelf(

c++ - 错误 LNK2019 : unresolved external symbol

好的,所以我在尝试找出代码中的问题时遇到了问题。我有很多代码,所以我只会发布编译时出现问题的相关部分。我在一个类中有以下函数,它会编译并且一切都会正常运行,直到我调用函数“CalculateProbabilityResults”并在其中运行第7行代码。我已经在我的程序中“取消注释”了这行代码,这样您就可以更容易地找到它。我很确定我有正确的#include指令,因为它在不调用函数时编译得很好,所以这不是问题,不是吗?我知道我的一些命名符号需要一点帮助,所以请多多包涵。在此先感谢您的帮助。intSQLServer::CalculateProbabilityResults(intprofil

c++ - 在运行时再次出现 "undefined symbol",C++

我有一个数据类型,我可以实例化该类型的变量。像这样:FetchAddrfaddr(VirtualMemoryAddress(0x0a));FetchAdr的定义是:structFetchAddr{VirtualMemoryAddresstheAddress;FetchAddr(VirtualMemoryAddressanAddress):theAddress(anAddress){}};现在我有一个faddr是私有(private)(或公共(public))变量的类classFLEXUS_COMPONENT(BPred){staticFetchAddrfaddr;public:FLEX

c++ - OpenMP Mac OSX Lion c++ 链接器错误 Undefined symbols for architecture x86_64 : "_omp_get_thread_num"

我在互联网上的任何地方都找不到这个问题。所以我的链接器错误是:Undefinedsymbolsforarchitecturex86_64:"_omp_get_thread_num()"这是我的代码:intnthreads;inttid;#pragmaompparallelprivate(tid){tid=omp_get_thread_num();if(tid==0){nthreads=omp_get_num_threads();printf("numberofthreads:%d\n",nthreads);}} 最佳答案 看起来你忘

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