undefined-symbol

Symbol(s) not found for architecture x86_64 - Cmake - Mac sierra

对着背影说爱祢 提交于 2019-12-10 10:40:03
问题 Recently I have started a new project in C++. The problem is, when I try to compile it I get a linking error. I spent the whole day today trying to debug it, but I did not really find a good solution anywhere. If someone could help with it it would be amazing. I am using a Mac Sierra. parsing/methylation.h #ifndef EPIRL_METHYLATION_H #define EPIRL_METHYLATION_H #include <stdio.h> #include <iostream> #include <fstream> #include <vector> #include <sstream> using namespace std; namespace

Visibility of template function specialisations in shared libraries; dependence on template parameter

我只是一个虾纸丫 提交于 2019-12-08 08:00:34
I am building some C++ code that utilises pybind11 to do some wrapping and create a Python extension module, and I am encountering some undefined symbol problems. Upon further examination, it appears to be because certain template function specialisations are not publically visible in the shared library I am building. I have a MWE to demonstrate explicitly the problem: symbol_test.hpp #include <pybind11/pybind11.h> template <typename T> void test_func(T var) {} template <> void test_func<int>(int); template <> void test_func<pybind11::object>(pybind11::object); symbol_test.cpp #include "symbol

Visibility of template function specialisations in shared libraries; dependence on template parameter

烂漫一生 提交于 2019-12-08 06:35:40
问题 I am building some C++ code that utilises pybind11 to do some wrapping and create a Python extension module, and I am encountering some undefined symbol problems. Upon further examination, it appears to be because certain template function specialisations are not publically visible in the shared library I am building. I have a MWE to demonstrate explicitly the problem: symbol_test.hpp #include <pybind11/pybind11.h> template <typename T> void test_func(T var) {} template <> void test_func<int>

C++: linked library disappears and gives segfault during execution

社会主义新天地 提交于 2019-12-07 18:21:31
I'm having a problem building a library. In the Makefile I tell g++ that I need tclstub8.6 by putting -ltclstub8.6 , and g++ takes it into account (sorry for these messages in French): make: AVERTISSEMENT : le fichier « ../Linux-PORT/i586-GCC4/Makefile » a une date de modification 609 s dans le futur *** Compile c [gcc] libtestGuiMnt_info.Linux-PORT.i586-GCC4.c *** Compile C++ [g++] mntdisplay.cc *** Compile C++ [g++] mntogl.cc mntogl.cc: In member function 'virtual int MNTOgl::Display() const': mntogl.cc:228:12: warning: unused variable 'ErrorCheckValue' [-Wunused-variable] *** Compile C++ [g

Undefined symbol errors when linking of C++ project using Eclipse

六月ゝ 毕业季﹏ 提交于 2019-12-07 17:55:40
I compiled one C++ project which transplanted from another project, and there are some undefined symbol warnings while linking after compiled. The point is that these warnings are so strange. They are divided into 2 types: Type 1: dld: warning: Undefined symbol **'__record_needed_destruction'** in file './xxx/xx.o' dld: warning: Undefined symbol **'__memzero'** in file './xxx/xyy.o' dld: warning: Undefined symbol **'__vec_delete'** in file './xxx/xyz.o' dld: warning: Undefined symbol **'__vec_new'** in file './xxx/yy/xxx/yyy.o' dld: warning: Undefined symbol **'__pure_virtual_called'** in file

How can I resolve single symbol link error when dynamically linking XCode project to lib4cxx library?

瘦欲@ 提交于 2019-12-07 13:46:32
I'm writing in C++ under XCode 4.6 on Mountain Lion. I'm trying to add and use the Apache log4cxx library. I installed the library this morning via Brew. I'm linking against liblog4cxx.dylib. I'm getting a link error that just one symbol can't be found: Undefined symbols for architecture x86_64: "log4cxx::Logger::forcedLog(log4cxx::helpers::ObjectPtrT const&, std::__1::basic_string, std::__1::allocator > const&, log4cxx::spi::LocationInfo const&) const", referenced from: I know it's finding the library file because if I remove it, I get lots more undefined symbol errors relating to log4cxx.

what does the $ld$add$os10.4$ prefix mean when I use nm to look at a symbol list on a Mac?

蓝咒 提交于 2019-12-06 07:28:57
I'm having some problems with my iPhone app not linking for the iPhone Simulator. It tells me there are undefined symbols: Undefined symbols for architecture i386: ".objc_class_name_NSRunLoop", referenced from: pointer-to-literal-objc-class-name in SampleBrowser.cpp.o ".objc_class_name_NSDate", referenced from: pointer-to-literal-objc-class-name in SampleBrowser.cpp.o ".objc_class_name_NSAutoreleasePool", referenced from: pointer-to-literal-objc-class-name in SampleBrowser.cpp.o pointer-to-literal-objc-class-name in libRenderSystem_GLES2Static.a(OgreEAGL2Window.mm.o) ".objc_class_name

Lua: C++ modules can't reference eachother, undefined symbol

…衆ロ難τιáo~ 提交于 2019-12-04 23:22:01
问题 I've created two modules (shared objects) CPU and SaveState as part of an emulator. Both are independently compiled into .so separate files, and loaded at runtime by a Lua script using require(); i.e.: SaveState = require("SaveState") CPU = require("CPU") Within CPU, there's a method that operates on a SaveState: int CPU::save_state(SaveState *state) { state->begin_section(savestate_namespace, savestate_data_size); state->write16(this->reg.af); state->write16(this->reg.bc); state->write16

How do I find where a symbol is defined among static libraries

删除回忆录丶 提交于 2019-12-04 19:21:53
问题 Suppose you work with a codebase comprising several tools and libraries and you want to port (or resurrect) some component within such codebase but any clue about where symbols lie within the various libs is either lost or will take ages to find out by looking at the code itself (yes improved documentation can avoid such issues but is quite demanding). What is the fastest way to discover in which library you can find symbols used in the code? 回答1: Assuming a linux box, the nm tool, listing

Google Conversion Tracking for iOS linker error for architecture armv7

与世无争的帅哥 提交于 2019-12-04 02:42:09
I'm trying to add the Google Conversion Tracking for iOS feature to my iPhone app. The app's base SDK is iOS6 the app's valid architectures is armv7, armv7s the app's iOS deployment targer is 4.3 I'm using the latest xcode 4.5.2 and OSX 10.8.2 The app is in appstore and is ok for iPhone 3-4-5 When I try to add the Google Conversion Tracking for iOS following this link: https://developers.google.com/mobile-ads-sdk/docs/admob/conversion-tracking I have this error: Undefined symbols for architecture armv7: "_OBJC_CLASS_$_ASIdentifierManager", referenced from: objc-class-ref in