undefined-symbol

How to determine inter-library dependencies?

六眼飞鱼酱① 提交于 2019-12-01 04:42:33
问题 My project consists of a couple of static libraries, which are linked together in a final step. Now I have the problem, that the link order of the library is important (otherwise I get an undefined symbol linker error). Sometimes I run into the problem, that I have to re-sort the linked libraries (-lcommon -lsetup -lcontrol etc). At the moment it's a stupid trial and error: re-sort, compile, check error, re-sort, compile and so on. So I wrote a small program to show me the inter-library

Cython build resulting in undefined symbol

南笙酒味 提交于 2019-12-01 02:13:47
问题 I've got a c++ program I'm trying to wrap/convert to Cython. It uses a particular library that for some reason, will not result in a working module for importing. There is a working c++ program, by the way. Here's the setup.py: ext_modules = [ Extension( name="libnmfpy", sources=["interface/nmf_lib.pyx"], include_dirs = ["../src/", numpy.get_include()], libraries=["nmf","mpi_cxx","mpi","m"], library_dirs=["../build/Linux/bin.release","/usr/local/lib/","/usr/lib"], language="c++",) ] setup(

GoogleMapsSDK : Undefined symbols for architecture x86_64

孤者浪人 提交于 2019-11-30 08:24:34
I am trying to install the Google maps SDK and I am running through this error when running: Undefined symbols for architecture x86_64: "_CBAdvertisementDataManufacturerDataKey", referenced from: -[GMSx_PEBeaconScanner centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in GoogleMaps(PEBeaconScanner.o) "_CBAdvertisementDataServiceDataKey", referenced from: -[GMSx_PEBeaconScanner centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in GoogleMaps(PEBeaconScanner.o) "_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from: -[GMSx_PEBeaconScanner scanIfAppropriate] in

GoogleMapsSDK : Undefined symbols for architecture x86_64

ぃ、小莉子 提交于 2019-11-29 11:10:12
问题 I am trying to install the Google maps SDK and I am running through this error when running: Undefined symbols for architecture x86_64: "_CBAdvertisementDataManufacturerDataKey", referenced from: -[GMSx_PEBeaconScanner centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in GoogleMaps(PEBeaconScanner.o) "_CBAdvertisementDataServiceDataKey", referenced from: -[GMSx_PEBeaconScanner centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in GoogleMaps(PEBeaconScanner.o) "

iPhone libxml2 undefined symbols (with gdata, kissxml, touchxml, etc.)

匆匆过客 提交于 2019-11-29 09:11:17
I'm trying to use any one of the libxml based 3rd party XML parsers, but I can't because I think I have a libxml2 problem of some sort I set my other linker flags to -lxml2 and header search paths to /usr/include/libxml2 but I still get a ton of undefined symbols when I try to compile. The errors below are the result of trying to compile TouchXML. Undefined symbols: "_xmlDocDumpFormatMemory", referenced from: -[CXMLDocument description] in CXMLDocument.o "_xmlXPathNewContext", referenced from: -[CXMLNode nodesForXPath:error:] in CXMLNode.o -[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath

Undefined symbols for architecture armv7 when using ZXing library in XCode 4.5

霸气de小男生 提交于 2019-11-28 03:56:30
What I am trying to do Integrate Zxing , QR code reader framework, in my iPhone project. I checked out ZXing sdk from here . I ran the sample project coming with ZXing, named ScanTest, without any issues. But when I try to integrate the library with my project I am getting the error mentioned. Project specification Target OS : iOS 6.0 Deployment target : iOS 5.0 or above. Tested on : iPhone 4 and iPhone 3GS. XCode : Xcode 4.5.1 ZXing version : 2.0 Problem When I build, after doing every integration steps in ZXing readme file , I am getting build errors like Undefined symbols for architecture

What is the “___emutls_get_address” symbol?

谁都会走 提交于 2019-11-28 03:33:05
问题 Oh, I am a newbie in GCC and MAC and Makefile. Today I intended to build a dynamic lib using MAC OS X and GCC 4.4.2, but when linking the .o files, the compiler complains like this: Undefined symbols: "___emutls_get_address", referenced from: _malloc in michael.o _malloc in michael.o ld: symbol(s) not found I googled this info, but I can't understand the results well, I wonder what does the symbol mean, and why lots of programs have this linking error. I also wonder what is the possible cause

Weird undefined symbols of static constants inside a struct/class

人走茶凉 提交于 2019-11-27 12:21:13
Either I'm very tired or something weird is happening that I'm not aware of, because the code below is resulting in undefined symbols for Foo::A and Foo::B when linking . This is minimized as much as I could from a larger project, but shows the essence of what I'm looking at. #include <algorithm> struct Foo { static const int A = 1; static const int B = 2; }; int main() { return std::min(Foo::A, Foo::B); } Without the std::min function template it works fine , i.e. just return Foo::A. Also fine is when defining the static ints outside a class/struct (global in this simple case). However, as

Undefined symbols error when using a header file

北城余情 提交于 2019-11-27 02:24:30
问题 I'm getting the following error and can't for the life of me figure out what I'm doing wrong. $ gcc main.c -o main Undefined symbols: "_wtf", referenced from: _main in ccu2Qr2V.o ld: symbol(s) not found collect2: ld returned 1 exit status main.c: #include <stdio.h> #include "wtf.h" main(){ wtf(); } wtf.h: void wtf(); wtf.c: void wtf(){ printf("I never see the light of day."); } Now, if I include the entire function in the header file instead of just the signature, it complies fine so I know

Undefined symbols for architecture armv7 when using ZXing library in XCode 4.5

五迷三道 提交于 2019-11-27 00:14:15
问题 What I am trying to do Integrate Zxing, QR code reader framework, in my iPhone project. I checked out ZXing sdk from here. I ran the sample project coming with ZXing, named ScanTest, without any issues. But when I try to integrate the library with my project I am getting the error mentioned. Project specification Target OS : iOS 6.0 Deployment target : iOS 5.0 or above. Tested on : iPhone 4 and iPhone 3GS. XCode : Xcode 4.5.1 ZXing version : 2.0 Problem When I build, after doing every