makefile: symbol(s) not found for architecture
Apr 1, 2012 at 4:21pm
Hello!
I'm trying to solve an issue with makefile.
I have a main.cpp and then addOn.cpp and addOn.hpp.
I'm just trying to do the simple makefile to compile this.
I have:
1 2 3 4 5 6 7 8
|
main: Main.o addOn.o
g++ -o main Main.o addOn.o
Main.o: main.cpp addOn.hpp
g++ -c main.cpp
addOn.o: addOn.cpp addOn.hpp
g++ -c addOn.cpp
|
But keep getting:
Undefined symbols for architecture x86_64:
"addOn::~addOn()", referenced from:
_main in Main.o
"addOn::overallVerboseLvl", referenced from:
addOn::setLevel(int) in Log.o
addOn::addOn() in addOn.o
addOn::addOn() in addOn.o
addOn::operator<<(char const*)in addOn.o
"addOn::fileName", referenced from:
addOn::setFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in addOn.o
addOn::addOn(int)in addOn.o
addOn::addOn(int)in addOn.o
addOn::addOn() in addOn.o
addOn::addOn() in addOn.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [main] Error 1 |
Please let me know if you need the code for all this. But it gives no errors in xCode4.
Topic archived. No new replies allowed.