|Linker error [message #1775331]
||Fri, 27 October 2017 17:30
| Derek Boucher
Registered: October 2017
Hopefully I am in the right place to ask for help about this. I am currently writing a simple program in C++ that takes in an integer value given by the user and then has the user decide what operations to perform on that number (i.e. double the number, find the square root of the number, etc...)
However I've come across an issue where eclipse compiler says the following:
Undefined symbols for architecture x86_64:
"numDouble(int)", referenced from:
menu2(int) in q2.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [A3q2] Error 1
I am aware that this has to do with my function called numDouble(int), however, i have declared the function globally, as well as given a full definition of it at the very bottom of my code...
here is how i declared the function:
void numDouble(int); (globally)
here is how i defined my function:
void numDouble(int &x)
x *= 2;
and here is how i called it, from my menu2(int x) function:
... more switch cases.
I have already written more complex codes than this and had no issues... I have updated eclipse this morning and was wondering if perhaps it was a bug in the newer version, or am i really not seeing something obvious that is wrong with my code?
Thank you in advance!
Powered by FUDForum
. Page generated in 0.03390 seconds