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
3
votes
1 answer

xctool tests fail when xcodebuild works - Travis CI

I'm trying to integrate my project into Travis CI, and my builds have failed with the following errors: Undefined symbols for architecture i386 and Undefined symbols for architecture x86_64 I get these errors for basically every class in my project…
Mike
  • 9,765
  • 5
  • 34
  • 59
3
votes
2 answers

Type cast for undefined type

How can I implement typecast operator for a forward declared class. My code is. class CDB; class CDM { public: CDM(int = 0, int = 0); operator CDB() const //error { } private: int m_nMeters; int …
Nidhin MS
  • 229
  • 1
  • 11
3
votes
1 answer

Undefined symbol in Poco C++

I previously compiled a simple command line program that made use of Poco C++ (which I love, by the way). The program ran perfectly for several months. A few things must have changed on my computer, because now when I run the program, I receive the…
magnus
  • 4,031
  • 7
  • 26
  • 48
3
votes
0 answers

Numpy fails to load via JNI

I am trying to call python from a JNI library. This works as expected and thanks to all the information around on the interweb. My problem begins when I try to "import numpy as np". When I include that in any python script, PyImport_Import(pName) in…
3
votes
2 answers

Boost Thread Destructor Undefined Symbol

I'm using OSX Mountain Lion. I just downloaded, unpacked, and built boost 1.52.0 using the instructions supplied from the boost website: http://www.boost.org/doc/libs/1_52_0/more/getting_started/unix-variants.html. I left the default installation…
user1896626
3
votes
1 answer

Xcode 4.5.1: Linker Error: NSJavaVirtualMachine, symbol not found for architecture i386

I am trying to call a Java class from an objective C, iPhone 5 application. I am using Xcode 4.5.1. At this stage, I can't even load the Virtual Machine without the following error: Undefined symbols for architecture…
3
votes
1 answer

C++: Undefined symbols when loading shared library with dlopen()

I have an issue when I try to use dlopen() to load a shared library into another shared library. I checked all tutorials on how to use dlopen() correctly. So here is the simplified code: The main shared library contains a class with pure virtual…
Denis Loh
  • 2,194
  • 2
  • 24
  • 38
3
votes
0 answers

Cython : C++ shared library and undefined symbols using pure virtual methods from a base class

I build a .so C++ library using g++ and -fPIC (using eclipse). Still using eclipse, I linked this library and used it in another C++ project without any problem. But, When I build a Cython project with that same lib to generate a python extension,…
Gauthier Boaglio
  • 10,054
  • 5
  • 48
  • 85
3
votes
4 answers

Using Crypto++ with clang

I'm attempting to get the following Crypto++ (C++ Class Library of Cryptographic Schemes) example to work on a iMac using clang++. Example SHA256 hash; byte digest[ SHA256::DIGESTSIZE ]; hash.CalculateDigest( digest, (byte*) &value[ 0 ],…
Ben Crowhurst
  • 8,204
  • 6
  • 48
  • 78
2
votes
0 answers

Application to overwrite included library's malloc

Objective My application has a custom memory allocator. Also, that application includes an open source third party library. I need to have the third party's allocations/frees call into the custom memory allocator. Specific Requirements Map the…
user1266174
  • 111
  • 2
  • 11
2
votes
0 answers

Undefined symbol vs undefined reference

I saw this post here: ld: undefined symbol vs ld: undefined reference and I don't think it really talks about what the differences are between these 2 linker errors. I usually get undefined reference linker errors when the linker can't find the…
24n8
  • 1,898
  • 1
  • 12
  • 25
2
votes
1 answer

C++ symbol visibility for explicit template instantiation

I create a shared library and use default symbol visibility "hidden", i.e., I explicitly have to modify visibility of anything that shall be exported. Moreover, I defined templates in the header files and explicitly instantiate them in the source…
2
votes
1 answer

Java symbol lookup error: /usr/lib64/jvm/java-11-openjdk-11/lib/libnio.so: undefined symbol: initInetAddressIDs

I am using openjdk-11 in a suse linux server. When I try to run my cpp build with -64bit flag I am getting this error: Java symbol lookup error: /usr/lib64/jvm/java-11-openjdk-11/lib/libnio.so: undefined symbol: initInetAddressIDs Here is my ldd…
Muzik
  • 33
  • 1
  • 1
  • 6
2
votes
2 answers

What do I link in to define boost::thread_specific_ptr and related?

I want to use boost::thread_specific_ptr but need to know what to add to my gcc v3.4.6 link line to define what it uses: /usr/include/boost/thread/tss.hpp:35: undefined reference to…
WilliamKF
  • 41,123
  • 68
  • 193
  • 295
2
votes
1 answer

CLion Linker Error with Standard Library and GCC

I am taking a class which requires the use of GCC as the compiler. I am trying to ensure CLion is using GCC, but I no matter what I do I keep getting the following error upon trying to run my file: Scanning dependencies of target Sandbox [ 50%]…
pyotr
  • 21
  • 2