Cpp Error Undefined Reference To
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and
C++ Compile Undefined Reference To
policies of this site About Us Learn more about Stack Overflow the c++ error undefined reference to function company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags
C++ Error Undefined Reference To Constructor
Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only c++ error undefined reference to main takes a minute: Sign up Linker Error C++ “undefined reference ” [duplicate] up vote 8 down vote favorite 2 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/cc1pZ8OM.o: In function `main': main.cpp:(.text+0x148): undefined reference to `Hash::insert(int, char)' collect2: c++ error undefined reference to vtable for error: ld returned 1 exit status main.cpp #include
tried to compile it and I undefined reference to function c++ got this error: Undefined reference to 'intro()' Undefined reference to 'menu(int' I
C++ Undefined Reference To Class
looked into the code and I can't find any obvious errors, so I googled around and didn't find anything that http://stackoverflow.com/questions/14557657/linker-error-c-undefined-reference would fix my error... Here's my code: Main.cpp 1
2
3
4
5
6
7
8
9
#include "headers.h" int main() { intro(); menu(0); } headers.h 1
2
3
4
5
6
7
8
9
10
11
12
13
14
//all the #includes: #include
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#include "headers.h" //intro function:: pretty simpple stuff: void intro() { cout << endl; cout << endl; cout << endl; cout << endl; cout << " A Game By Mrcerimo" << endl; Sleep(1500); cout << " The Match the pairs game" << endl; Sleep(1500); } //menu function: //it contains two kind of menus: //1.menu is the menu that you get in when you strat the program //2. menu is the menu you can accsess while playing the game , thus the option to continue:: void menu(int x) // takes in int x, so we will know wich menu to choose: { if (
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of https://ubuntuforums.org/showthread.php?t=662844 Conduct Ubuntu Wiki Community Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation User Documentation Social Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & undefined reference Programming Programming Talk c++ "undefined reference to ..." error..please help Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Results 1 to 5 of 5 Thread: c++ "undefined reference to ..." error..please help Thread Tools Show Printable Version Subscribe undefined reference to to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode January 9th, 2008 #1 hereitcomes View Profile View Forum Posts Private Message 5 Cups of Ubuntu Join Date Apr 2006 Beans 18 c++ "undefined reference to ..." error..please help having followed suggestions in other threads around the same problem, I'm going to have to post my own example and hope someone can help I'm just starting to learn C++ from a Java background I have 3 files, main.cpp, TestClass.cpp, TestClass.h It was working until I decided to create my own method "gimme()" in the TestClass class, then I started getting the undefined reference from the call in main Thanks for any advice Edit: Here is the error from eclipse: Code: **** Build of configuration Debug for project HelloManage **** make -k all Building file: ../TestClass.cpp Invoking: GCC C++ Compiler g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"TestClass.d" -MT"TestClass.d" -o"TestClass.o" "../TestClass.cpp" Finished building: ../TestClass.cpp Building target: HelloManage Invoking: GCC C++ Linker g++ -o"HelloManage"