Questions tagged [undefined-symbol]

After all of the input files have been read and all symbol resolution is complete, the link-editor searches the internal symbol table for any symbol references that have not been bound to symbol definitions. These symbol references are referred to as undefined symbols. Undefined symbols can affect the link-edit process according to the type of symbol, together with the type of output file being generated.

Usually the errors related to are mean this:

It means you haven't written a function, or you haven't created a variable, or you haven't linked against the library or object code that contains the missing function or variable.

It means the linker has looked through all the compiled code you told it to, and it still can't find what it's looking for.


Source0 and Source1

417 questions
6
votes
1 answer

Undefined symbols on erlang nif shared library

I'm having troubles trying to link my shared library(an erlang nif), to another shared library(libpurple), that loads other shared libraries(plugins) using dlopen. The issue is that mylib.so links to libpurple.so, libpurple.so loads plugins.so…
roger
  • 141
  • 1
  • 5
6
votes
2 answers

ld reports missing symbols, but symbols seem to exist

I'm trying to link my mac application to the wonderful libancillary library. However, I have changed the library build script to create a shared library. I can inspect the symbols in this library using nm libancillary.dylib - the result…
Thomi
  • 11,647
  • 13
  • 72
  • 110
6
votes
2 answers

Cython build resulting in undefined symbol

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 =…
Ben
  • 2,065
  • 1
  • 13
  • 19
6
votes
1 answer

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

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 =…
Rena
  • 3,923
  • 3
  • 22
  • 19
5
votes
3 answers

Xcode to develop for the Arduino

Please read this well to make sure you understand what I want to do. I DO want Xcode to be able to compile, but only so I can debug in Xcode. I do NOT want to use Xcode to compile or upload the code to the Arduino board. I will use the Arduino IDE…
user922764
  • 61
  • 2
  • 5
5
votes
1 answer

Problem linking Boost.Filesystem statically to a shared library

I'm building a shared library with GCC 4.5.2 and Boost 1.46.1 (compiled with --build-type=complete) and this is a command from Makefile which does the linkage part: $(CXX) -static -lboost_filesystem -fpic -shared $^ -o $@ Everything compiles fine…
szx
  • 6,433
  • 6
  • 46
  • 67
5
votes
4 answers

Trouble with linking boost::python::numpy

I wrote a small example to show what's going on. my_test.cpp #include #include namespace np = boost::python::numpy; int my_Foo() { Py_Initialize(); np::initialize(); std::cout << "hello\n"; return…
Dominik
  • 93
  • 1
  • 6
5
votes
2 answers

Android Studio Integration test cannot resolve symbol AndroidJUnit4

I've seen partial answers to similiar issues but never one that actually solved the problem. I've boiled this down to a minimal app to demonstrate the issue. I'm using the most current version of Android Studio (V2.2.1) I have the following SDK's…
5
votes
1 answer

ImportError igraph: undefined symbol

After installing python-igraph with pip, I still can't import it. I've encountered such error around the internet but most solutions I've found were about reinstalling the module, which I already did. Any suggestions on how to fix this would be…
bmo
  • 147
  • 1
  • 11
5
votes
1 answer

Undefined linker symbol at runtime when the symbol equals zero

I am trying to use linker symbols to automatically set a version number in my executables, and it seems to work as long as the symbols aren't set to zero... In my C code: extern char __VERSION_MAJ; extern char __VERSION_MIN; ... printf("Version…
Kisama
  • 161
  • 5
5
votes
1 answer

Unable to connect boost library to my project "symbol lookup error"

I have the following situation: I've created dynamic library lib.so. This library uses another static library lib.a. Both of them use Boost library (I link them in CMake file). (I use this dynamic library in Java project) This is code of file.cpp in…
Ann Orlova
  • 1,338
  • 15
  • 24
5
votes
2 answers

"Undefined symbols for architecture i386" on unit tests

I'm getting the following error only when I try to build the unit tests of an iPhone static library: Undefined symbols for architecture i386: "std::terminate()", referenced from: -[ZipArchive dealloc] in libMyProject.a(ZipArchive.o) …
hpique
  • 119,096
  • 131
  • 338
  • 476
5
votes
3 answers

Undefined symbol error for base class in C++ shared library

I compiled the following code as a shared library using g++ -shared ...: class Foo { public: Foo() {} virtual ~Foo() = 0; virtual int Bar() = 0; }; class TestFoo : public Foo { public: int Bar() { return 0; } }; extern "C" { Foo* foo; …
Frank
  • 64,140
  • 93
  • 237
  • 324
4
votes
1 answer

Export symbols file: Objective C derived class members, 64-bit

I have a Cocoa-based universal dynamic library that also includes more static libraries, from which I want to export functionality. It seems I cannot do the latest without using an export symbols file, and this is fine by me ... somehow. I don't use…
Liviu
  • 1,859
  • 2
  • 22
  • 48
4
votes
2 answers

"symbol(s) not found for architecture i386" problem using ShareKit

I want to use the http://getsharekit.com framework for future iOS projects. Hence I started testing out the framework. But I already get the following error: Undefined symbols for architecture i386: "_OBJC_CLASS_$_SHKItem", referenced from: …
andi1984
  • 676
  • 10
  • 27
1 2
3
27 28