Hey there,
I'm getting "unresolved Symbol ABC" error when building my project every time I'm calling the constructor of my own classes in my main method.
I've created a minimalistic example. Here's the code:
/*
* TestClass.h
*
* Created on: 19.01.2012
* Author: s.schindler
*/
#ifndef TESTCLASS_H_
#define TESTCLASS_H_
#include
using namespace MAUtil;
class TestClass {
public:
TestClass(int i, String str);
virtual ~TestClass();
private:
int i;
String str;
};
#endif /* TESTCLASS_H_ */
/*
* TestClass.cpp
*
* Created on: 19.01.2012
* Author: s.schindler
*/
#include "TestClass.h"
TestClass::TestClass(int i, String str) : i(i), str(str) {}
#include "TestClass.h"
/**
* Entry point of the program. The MAMain function
* needs to be declared as extern "C".
*
*
*/
extern "C" int MAMain()
{
TestClass *test = new TestClass(5,"Hello");
return 0;
}
When building the project, I get this Error: "Error: Unresolved symbol '__ZTV10TestClass'" in TestClass.cpp at the line where I'm implementing the constructor.
You can see my build settings in the attachment.
What am I doing wrong?
Thanks in advance!
| Attachment | Size |
|---|---|
| Build_settings.png | 284.86 KB |