undefined-reference Questions

1

Solved

I have a Qt C++ application that includes a third-party library (along with its .h header file). However, when I set QMAKE_CCFLAGS += -std=c++11 and CONFIG += c++11, I get undefined reference for f...
Overblouse asked 10/6, 2015 at 21:22

1

Solved

I've encountered a strange case when the final keyword is added to a virtual function declaration, with its definition on a separate .cpp file. Consider the following example: IClass.hpp class IC...
Thomas asked 18/5, 2015 at 23:30

5

Solved

I'm trying to get the following simple 'Hello World' program to compile using a cross compiler (GCC 4.9.2) targeting mips: #include <stdio.h> int main() { int x = 5; printf("x = %d\n", x)...
Riser asked 3/5, 2015 at 9:38

2

Solved

I have this following simple program I am trying to compile in linux ubuntu. Main.c: #include <stdio.h> #include "Person.h" int main() { struct Person1 p1 = Person1_Constructor(10,...
Bordeaux asked 2/5, 2015 at 4:44

1

Solved

I installed the CMocka testing framework and tried the sample code: #include <stdarg.h> #include <stddef.h> #include <setjmp.h> #include <cmocka.h> /* A test case that doe...
Interlocutrix asked 29/4, 2015 at 13:51

7

Solved

I'm making a program in C++ that uses 2 images to detect SURF Features, compute the matches with a bruteforcematcher and draws it. Here's the code #include <cstdio> #include <string> ...
Loculus asked 1/4, 2012 at 22:42

1

Solved

use libcurl to writer some test code. when try to compile, it says undefined reference. already use -lcurl or -L compile option. root@ubuntu:~/work/test/curlTest# curl-config --libs -L/usr/lib/x86...
Merriweather asked 27/1, 2015 at 7:45

1

Solved

I am compiling using arm-linux-gnueabi-g++ version 4.7.3. I have the arm-linux-gnueabi libraries installed at location: /usr/arm-linux-gnueabi/lib, it contains libdl.a, libdl.so, libdl.so.2, a...
Rafflesia asked 22/12, 2014 at 17:2

1

Solved

I've added an intrinsic to an input code using an LLVM pass. I'm able to see the intrinsic call, yet I can't figure out how to compile the code to my target architecture (x86_64). I'm running the f...
Margarettmargaretta asked 19/12, 2014 at 16:21

1

Solved

I am trying to compile a project I am working on that uses ffmpeg libraries. The project is written in C. The header files are appropriately included in the source code. In particular, it seems to ...
Fungistat asked 8/12, 2014 at 20:35

1

Solved

I'm trying to go through this tutorial: http://www.tcpdump.org/pcap.html Now I have install pcap (code hints and all that is working) using : sudo apt-get install libpcap-dev and so far I have ...
Tirrell asked 24/11, 2014 at 15:11

4

Solved

I have a Main executable that loads .dll/.so Plugins, which works just fine in Linux but on windows(Visual Studio 2012), it fails with undefined reference errors. The plugin uses functions like se...
Ginny asked 16/3, 2013 at 21:36

3

Solved

I keep getting undefined reference when i call the two functions from my template class "add" and "greater" in my main function. So, i have: number.h #ifndef NUMBER_H #define NUMBER_H temp...
Urmia asked 23/3, 2014 at 18:18

1

Solved

I was trying out the following piece of code: GeneralTemplate.h #ifndef _GENERATEMPLATE_H_ #define _GENERATEMPLATE_H_ #include <iostream> template <class T> class GeneralTemplate { p...
Fulminate asked 16/10, 2014 at 23:25

7

Solved

#include <my_global.h> #include <mysql.h> int main(int argc, char **argv) { printf("MySQL client version: %s\n", mysql_get_client_info()); } ~$ gcc -o mysql-test MySQL-Test.c im...
Euterpe asked 3/8, 2010 at 11:53

3

Solved

I have a static library that I have built with MinGW, I am trying to link to that library from a Qt application. I keep getting linker errors caused by one of the object files in the library. This ...
Gargantua asked 3/2, 2010 at 4:21

2

Solved

Suppose I have two source files — UndefErr.cpp: #include <cstdio> void UndefFunc(); void Func2(){UndefFunc();} void Func1(){printf("Hi\n");} And the main.cpp: void Func1(); int main(){...
Madewell asked 11/6, 2014 at 11:38

0

I have a C++ class whose definition is going to be loaded at run-time through dlopen. I can't get it to link though. I get errors saying there is an "undefined reference to typeinfo". The relevant...
Oersted asked 9/6, 2014 at 13:9

1

Solved

I am trying to compile a C++ program like this: $ g++ -o Sniffer_Train main.cpp Sniffer_train.cpp Sniffer_train.h -lmysqlclient -lpcap However I get the following error: /usr/bin/ld: /tmp...
Elusion asked 7/6, 2014 at 11:45

3

Solved

I recently installed the hdf5 library on an ubuntu machine, and am now having trouble linking to the exported functions. I wrote a simple test script readHDF.cpp to explain the issue: #include &lt...
Devotee asked 15/2, 2013 at 23:48

1

Solved

I have a problem with compiling my program which uses glfw3 library. I'm getting list of errors of undefined references when trying to compile with make but my classes are compiled into .o files, ...
Quartana asked 14/10, 2013 at 14:3

3

Solved

MEGAEDIT 3000 I have discovered the cause of undefined references. I checked my .o files for symbols, and they were just missing. Just weren't there. For no apparent reason. I have checked the sou...
Dappled asked 20/7, 2013 at 11:30

4

I have the following setup (hopefully this is not too bare an example): A.h typedef std::map<unsigned int, float> MyClass; extern MyClass inst; A.cpp MyClass inst; B.h #include <A....
Mcavoy asked 7/9, 2010 at 12:4

1

Solved

Recently I learned the beautiful language D, which is so more plastic and helps yourself writing stable fast programs. But its not popular... because few code written on D and so more on C and C++....
Sometimes asked 14/7, 2013 at 13:15

1

Solved

I am writing a testcase that will have a SetUpTestCase() method that will allocate a shared resource although I am receiving undefined reference linker errors. class ParsingEventsTest: public ::te...
Latish asked 28/6, 2013 at 8:1

© 2022 - 2024 — McMap. All rights reserved.