Possible Duplicate:
What is an undefined reference/unresolved external symbol error and how do I fix it?
This should be a simple problem but I'm still having issues. I've looked at similar questions but they seem a bit more complex then what I'm looking for.
I'm using Code::Blocks 10.05.
I'm getting a undefined reference to my class files. I know this is a linker error but I'm not sure how to fix it. I'm afarid I don't know very much about linking files.
s\Desktop\the cool container\Test 1\Class2.o:Class2.cpp|| undefined reference to `Burrito::Burrito()'|
||=== Build finished: 1 errors, 0 warnings ===|
All my files are in the same folder. My object does nothing, I'm just trying this out and I should not get errors from creating an object from another class.
Yeah, this is from TheNewBoston tutorial... He was able to get this work, so I should be able to get it working.
If I include #include "Burrito.cpp"
in the Class2.cpp then it works, but he did not include that.
------------Class2.cpp-----------------
#include <iostream>
#include "Burrito.h"
using namespace std;
int main(){
Burrito Bo;
return 0;
}
---------------Burrito.h----------------
#ifndef BURRITO_H
#define BURRITO_H
class Burrito
{
public:
Burrito();
};
#endif // BURRITO_H
---------------Burrito.cpp-----------------
#include "Burrito.h"
#include<iostream>
using namespace std;
Burrito::Burrito()
{
}