Linked Questions
3,575 questions linked to/from What is an undefined reference/unresolved external symbol error and how do I fix it?
219
votes
31
answers
666k
views
Unresolved external symbol in object files [duplicate]
During coding in Visual Studio I got an unresolved external symbol error
and I've got no idea what to do. I don't know what's wrong.
Could you please decipher me? Where should I be looking for what ...
94
votes
4
answers
548k
views
C++ error 'Undefined reference to Class::Function()' [duplicate]
I was wondering if anyone could help me out with this - I'm only new to C++ and it's causing me a fair amount of troubles.
I'm trying to make relatively simple Deck and Card class objects.
The ...
47
votes
3
answers
340k
views
Linker Error C++ "undefined reference " [duplicate]
Possible Duplicate:
What is an undefined reference/unresolved external symbol error and how do I fix it?
Trying to compile my program via g++ -o prog1 main.cpp -std=c++0x
I get the error:
/tmp/...
25
votes
6
answers
49k
views
Error with GLUT compile in ubuntu [duplicate]
I try to compile some "hello world" glut application:
#include <stdlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
GLint Width = 512, Height = 512;
...
34
votes
6
answers
287k
views
Undefined Reference to [duplicate]
When I compile my code for a linked list, I get a bunch of undefined reference errors. The code is below. I have been compiling with both of these statements:
g++ test.cpp
as well as
g++ ...
30
votes
1
answer
83k
views
G++ undefined reference to class::function [duplicate]
I'm finally pretty desperate. So, in my c++ class we were instructed to use classes. We'd have the header file declare the class and functions while a separate .cpp file implements the it. Things ...
36
votes
1
answer
40k
views
"undefined reference" to Virtual Base class destructor [duplicate]
Possible Duplicate:
What is an undefined reference/unresolved external symbol error and how do I fix it?
I have some experience with Java, and am now doing a C++ course. I wanted to try writing ...
25
votes
1
answer
183k
views
What causes the error "undefined reference to (some function)"? [duplicate]
I get the error:
main.o(.text+0x1ed): In function `main':
: undefined reference to `avergecolumns'
collect2: ld returned 1 exit status
when I gcc *.o. I'm not quite sure what causes this error. ...
16
votes
6
answers
85k
views
How can I resolve "error LNK2019: unresolved external symbol"? [duplicate]
I've got this MFC application I'm working on that needs to have an embedded database. So I went hunting for a slick, fast "embeddable" database for it and stumbled accross SQLite.
I created a DB with ...
8
votes
3
answers
49k
views
Compiling and runnin OpenGL (glut) program in ubuntu 10.10 [duplicate]
I wrote this code:
#include <stdio.h>
#include <stdlib.h>
#include <GL/glx.h>
#include <GL/gl.h>
#include <GL/glut.h>
void init()
{
glClearColor(1.0,1.0,1.0,0.0)...
12
votes
2
answers
146k
views
error LNK2001: unresolved external symbol (C++) [duplicate]
Say I have this function called DoThis(const char *abc) in a file called one.cpp. So when I attempt to call this function from another function in a different source file (two.cpp), I get the error: ...
7
votes
6
answers
61k
views
C++ unresolved externals [duplicate]
Does anyone know what this means?
1> Generating Code...
1>BlankWindowDXbaseImpl.obj : error LNK2019: unresolved external symbol "public: __thiscall DXBase::DXBase(void)" (??0DXBase@@QAE@XZ) ...
11
votes
1
answer
12k
views
Undefined References Compiling OpenGL/glfw/glew on Ubuntu(g++) [duplicate]
I am following this tutorial. I cmake'd and make/make install'd glfw and glew perfectly(as far as I'm aware). However, when I try to compile the sample code...
#define GLEW_STATIC
#include <GL/...
8
votes
1
answer
19k
views
Issue loading images with stb_image [duplicate]
I want to load images using stb_image. I downloaded stb_image.h from https://github.com/nothings/stb. When I run the code:
string file="image.png";
int width,height,components;
unsigned char *...
23
votes
1
answer
21k
views
C++ Access private static member from public static method? [duplicate]
Let's say I have a .hpp file containing a simple class with a public static method and a private static member/variable.
This is an example class:
class MyClass
{
public:
static int ...