Top "Undefined-reference" questions

A linker error caused by a missing definition of a symbol used elsewhere in a program

cmake undefined reference to function

The project structure below is a simplified example. I tried to boil it down to the minimal amount of files …

cmake ld undefined-reference
android ndk undefined reference to a method

Hi Sorry for the long post I am trying to compile some static classes namely jsmn.c,json.c and …

android android-ndk static-libraries undefined-reference android-ndk-r7
ubuntu and libcap (capabilities) undefined reference

I'm trying to compile the following minimal C code on ubuntu 10.10: #include <sys/capability.h> void main(void) { …

c ubuntu undefined-reference linux-capabilities
Undefined reference on very simple program

Once I installed Ubuntu 11.10, strange error appears. I want to use GD with my C program, so I installed package "…

gcc linker linker-errors undefined-reference
Strange Compiler Error: "undefined reference to 'main'"

Could someone tell me what this means? /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/../../../crt1.o: In function `_start': (.text+0…

c++ undefined-reference
Undefined reference to operator >>

I am trying to work on operator overloading, my header file consists of: #ifndef PHONENUMBER_H #define PHONENUMBER_H #include&…

c++ undefined-reference
Undefined references when trying to link Qt app with my static library

I have a static library that I have built with MinGW, I am trying to link to that library from …

qt boost mingw cmake undefined-reference
Using GCC Undefined Behavior Sanitizer

Today I have read an article about GCC Undefined Behavior Sanitizer (ubsan). However, when I follow steps there (add -fsanitize=…

c++ gcc undefined-behavior undefined-reference ubsan
Undefined symbols error when using a header file

I'm getting the following error and can't for the life of me figure out what I'm doing wrong. $ gcc main.…

c linker-errors undefined-reference undefined-symbol
Google test undefined reference using SetUpTestCase static variable

I am writing a testcase that will have a SetUpTestCase() method that will allocate a shared resource although I am …

c++ googletest undefined-reference testcase