草庐IT

SYMBOL_INFO

全部标签

c++ - 惰性符号绑定(bind)失败 : symbol not found

我有三个头文件inmyproject描述对象Rational,Complex,和RubyObject.前两个是模板。所有这些都可以使用在头文件中定义的复制构造函数相互转换——除了那些从constRubyObject&构造Rational和Complex的构造函数,定义inasourcefile.注意:这些定义是必要的。如果它们全部进入标题,您将得到circulardependency.不久前,我遇到了someunresolvedsymbolerrors使用源文件中定义的两个复制构造函数。我能够在源文件中包含以下函数voidnm_init_data(){nm::RubyObjectobj

c++ - 删除内联函数调用导致 Unresolved external symbol 错误

我试图证明您需要在所有使用它的TU中定义一个inline函数。但是,以下代码编译良好(MSVS2010):inc.hinlinevoidfoo();测试.cpp#include"inc.h"voidx();intmain(){foo();//测试2.cpp#include"inc.h"voidx(){foo();}请注意函数调用是为了防止优化。这会编译,虽然foo被声明为inline并且仅在test.cpp中定义,但也在test2.cpp中使用>.如果我在main()中注释掉对foo的调用,我会得到预期的错误。"void__cdeclfoo(void)"(?foo@@YAXXZ)ref

c++ - ROS_INFO_STREAM 不打印

我正在尝试在叠瓦式try...catch中使用ROS_INFO_STREAM,但我只有顶级输出这是一小段代码:voidfailure(){try{//throwstd::length_errorstd::string("abc").substr(10);}catch(...){ROS_ERROR_STREAM("ROSfailure()");//printOKstd::cout输出:ROScallingROSfailure()coutfailure()coutcallfunction我的猜测是ROS_ERROR_STREAM看起来缓冲了,但作为错误输出它不应该。我正在运行ROSGroo

c++ - 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error>>

我创建了客户端应用程序。当我发送单个消息clientsever时它工作正常。但是当我出于性能目的发送大量消息时,客户端会以两种不同的方式崩溃:(gdb)runStartingprogram:/home/x64joxer/workerGenerators/Worker2/worker-t-i192.168.0.6-p6000-d5-l//home/x64joxer/workerGenerators/Worker2/[Threaddebuggingusinglibthread_dbenabled]Usinghostlibthread_dblibrary"/lib/x86_64-linux-

c++ - 带有 C++ 模板的 SWIG : undefined symbol

C++模板和SWIG不能很好地结合在一起。当我尝试导入我的模块时出现错误ImportError:./_simple.so:undefinedsymbol:_Z9double_itIiET_S0_我正在使用SWIG1.3。这是一个简单的例子来说明问题://file:simple.htemplateTdouble_it(Ta);//file:simple.cctemplateTdouble_it(Ta){return(2*a);}//file:simple.i%module"simple"%{#include"simple.h"%}%include"simple.h"%template(i

c++ - 无法将 boost 库连接到我的项目 "symbol lookup error"

我有以下情况:我已经创建了动态库lib.so。这个库使用了另一个静态库lib.a。它们都使用Boost库(我将它们链接到CMake文件中)。(我在Java项目中使用了这个动态库)这是lib.so中file.cpp的代码,从lib.a调用getFilesFromDirectory()#include"DrawingDetector.h"#include"../../DrawingDetection.h"#include#includeusingnamespacestd;JNIEXPORTvoidJNICALLJava_DrawingDetector_detectImage(JNIEnv*

c++ - 升级到 OS X Mavericks 后架构 x86_64 的 OpenCV undefined symbol

我有一个运行良好的opencv项目。今天我已经将我的OSXlion升级到Maverick,我收到以下imwrite函数的错误:Undefinedsymbolsforarchitecturex86_64:"cv::imwrite(std::__1::basic_string,std::__1::allocator>const&,cv::_InputArrayconst&,std::__1::vector>const&)",referencedfrom:_maininHello.old:symbol(s)notfoundforarchitecturex86_64我不得不说其他opencv函

c++ - 带有 OO 的模板导致 Unresolved external symbol 问题

我没有.cpp文件,因为我正在使用模板。但是还是遇到了unresolvedexternalsymbol的问题。有人知道原因吗?如果你能帮助我,非常感谢。templateclassSQLiteHelper{public:staticSQLiteHelper*getInstance(T*factory){if(NULL==m_sInstance){m_sInstance=newSQLiteHelper(factory);}returnm_sInstance;}private:SQLiteHelper(T*factory){m_factory=factory;}private:staticS

c++ - 我们能否在运行时确定两个 type_info 是否可转换?

有没有办法从两个const::std::type_info中判断对象,让我们将它们命名为B和D如果D描述的类型是从类型B派生的?我问是因为我想删除我得到的对象的类型,但稍后能够检查它是否可以安全地提升。void*data;const::std::type_info*D;templatevoidstore(D&&object){D=&typeid(object);data=::std::addressof(object);}templateB&load(){//if(typeid(B)!=(*D))throw::std::bad_cast{};return*reinterpret_cas

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