草庐IT

undefined-symbol

全部标签

c++ - 将 boost 与 MinGW 一起使用时对 WinMain@16 的 undefined reference

我在Windows7下使用Eclipse使用C++进行编程。我的makefile如下:build:g++-shared-o"lib\libCacheOpt.a""src\*.cpp"-enable-auto-import-I"${CWD}\include"-I"${BOOST}"-L"${BOOST}\lib"-lboost_program_options-lboost_unit_test_frameworkexec:buildg++"src\main.cpp"-enable-auto-import-I"${CWD}\include"-L"${CWD}\lib"-I"${BOOST}"

c++ - MinGW 上支持 OpenMP 的 Qt 插件 : Undefined reference?

我正在开发一个使用OpenMP的“Qt插件”(可以使用CMake参数启用/禁用OpenMP支持)。我使用MinGW和CMake作为开发环境。这就是我在代码中启用/禁用OpenMP的方式:#ifdefOPENMP_ENABLE#pragmaompparallelfor#endiffor(inti=0;igetZSize();i++){.我在CMake文件中启用了OpenMP,如下所示:OPTION(OPENMP_SUPPORT"BuildwithOpenMPparallaizationenabled")IF(OPENMP_SUPPORT)FIND_PACKAGE(OpenMP)SET(C

c++ - 将 HDF5 库链接到 Visual C++ DLL 项目 : unresolved external symbol __imp__*

我正在使用MSVisualC++2010Express构建一个插件,我想包含来自HDF5library的功能.我尝试过使用CMake从源代码构建HDF5,并安装预编译库(HDF5-1.8.7_CMake_x86_shared.zip对于VC2008)。对于任一构建目录/方法,我都修改了我的项目属性:C/C++>General>AdditionalIncludeDirectories:为HDF5添加includeLinker>General>AdditionalLibraryDirectories:为HDF5添加lib这是我的DLL模块的片段:#include"cpp/H5Cpp.h"s

c++ - 如何解决 : undefined reference to `non-virtual thunk to ...`

我正在尝试弄清楚如何进一步解决此问题。我还想知道如何安装更新版本的ld(如果有意义的话)。所有涉及的包管理器都告诉我,我是最新的。代码在ubuntu12.04和12.10上使用g++(4.7.2)编译、链接和运行,但在FC17上编译失败并出现此错误。ArchiveServiceLib/debug-posix/libArchiveLib.a(NamedIflTiffCache.o):(.rodata._ZTV26UnlockingGenericFileHandle[_ZTV26UnlockingGenericFileHandle]+0x58):undefinedreferenceto`I

c++ - 编译多个文件时出现奇怪的 undefined reference 错误

这个问题在这里已经有了答案:Whycantemplatesonlybeimplementedintheheaderfile?(17个答案)关闭9年前。我正在尝试编写一个玩具程序来练习C++,但我遇到了一个我无法解决的奇怪的undefinedreference错误。我的代码由3个文件组成:ex13_6.h:#includenamespaceex13_6{templateclassCmp{public:staticinteq(Ta,Tb){returna==b;}staticintlt(Ta,Tb){returna>voidbubble_sort(std::vector&v);}ex13_

c++ - SFML 2.1 架构 x86_64 错误的 undefined symbol

我最近安装了SFML2.1并尝试从终端编译和运行,而不是Xcode,他们网站上的示例程序http://www.sfml-dev.org/tutorials/2.0/start-linux.php.PathtowhereIinstalledSFML:/Users/.../Desktop/C++_Code/SMFL/SFML-2.1-osx-gcc-universal但是,我不断收到以下错误:Undefinedsymbolsforarchitecturex86_64:"sf::String::String(charconst*,std::__1::localeconst&)",refere

c++ - Lua 5.3 undefined reference

我正在尝试学习如何将lua嵌入到C程序中,但我不擅长阅读技术文档,而且我还没有找到任何当前教程。这是我的程序:#include#include#include#includevoidreport_errors(lua_State*,int);intmain(intargc,char**argv){for(intn=1;n编译器给出了luaL_newstate、luaL_openlibs、luaL_loadfilex、lua_pcallk和lua_close的undefinedreference错误。我在一台Windows计算机上使用Code::Blocks,我已将luainclude目

c++ - 链接器错误 : undefined reference c++

我曾尝试查看类似的问题,但无法轻易找到对我的问题有所帮助的问题。我用C++创建了一个项目,并在UNIX上编译、链接和运行它。我的具体问题是对我在单独文件中声明的方法的undefinedreference。在文件SharedCache.cpp中,我有以下方法:intSharedCache::replaceLine(ullongaddress){intevictPID=-1;intcacheSet=calcCacheSet(address);//randomuniformly-distributedvalueforcachelinefloatnumLines=static_cast(CAC

c++ - 从 stdexcept 类继承时为 "Undefined Symbols"

这是在中定义的异常:classlength_error:publiclogic_error{public:explicitlength_error(conststring&__arg);};这是我的异常(exception)情况:#include#includeusingnamespacestd;classrpn_expression_error:publiclogic_error{public:explicitrpn_expression_error(conststring&__arg);};为什么在时会出现此错误?不是吗?Undefinedsymbols:rpn_expressio

c++ - swig : undefined symbol: _ZN7hosters11hostersLink7getLinkEi 错误

我正在尝试为这个库创建一个python绑定(bind):http://code.google.com/p/hosterslib/.我正在使用swig,这是代码:%modulepyhosters%{#include"hosters/hosters.hpp"%}%include"hosters/hosters.hpp"我跑swig-c++-python-oswig_wrap.cxxswig.i我用编译g++-O2-fPIC-shared-o_pyhosters.soswig_wrap.cxxpython-config--libs--cflags-lhosters-lcln-lhtmlcxx