undefined reference.

I have an error and i don't know what to do. please help. Error is:

------------------------------------------------------------------

||=== gtdoe, Release ===|
obj\Release\test_1.o:test_1.cpp:(.text$_ZN2da6macros3doe15SpaceDefinitionD2Ev[da::macros::doe::SpaceDefinition::~SpaceDefinition()]+0x7)||undefined reference to `_imp___ZTVN2da6macros3doe15SpaceDefinitionE'|
obj\Release\test_1.o:test_1.cpp:(.text$_ZN2da6macros3doe15SpaceDefinitionC2Ev[da::macros::doe::SpaceDefinition::SpaceDefinition()]+0x4)||undefined reference to `_imp___ZTVN2da6macros3doe15SpaceDefinitionE|
||=== Build finished: 2 errors, 0 warnings ===|

------------------------------------------------------------------

And my code is as follows..



#include <iostream>
#include <unistd.h>
#include <GTDoe/GTDoe.hpp>
#include <GTDoe/DriverAPI/SpaceDefinition.hpp>

using namespace std;
using namespace da::macros::doe;
using da::macros::doe::DoeDriver;

class UnitSquare : public da::macros::doe::SpaceDefinition {
public:

// virtual void _imp___(){}

virtual unsigned defineNumberOfVariables() const {
// Design space dimensionality
return 2;
}

virtual void defineVariablesBounds(double* const lower, double* const upper) const {
// Variables bounds for each dimensionality
lower[0] = lower[1] = 0.;
upper[0] = upper[1] = 1.;
}

virtual unsigned defineNumberOfConstraints(){ return 0; }
virtual void defineConstraintsBounds(double* const lower, double* const upper) { }
virtual void defineConstraints(const double* const x, double* const c) { }
};

int main() {

// const unsigned sampleSize = 100;

using namespace da::macros::doe;
// Initialize DoeDriver
UnitSquare problem;

cout << "Hello test" << endl;

return 0;
}


Can somebody please help? Thank you very much for your suggestions.
I don't know the actual libraries you use but as far as I can understand you have some error to your constructor and destructor
da::macros::doe::SpaceDefinition::~SpaceDefinition()
da::macros::doe::SpaceDefinition::SpaceDefinition()

I think you haven't defined any constructor or destructor of your class. You are relying on the default ones. Is this what you want?

Also you don't need the latter as long as you got the former:
1
2
using namespace da::macros::doe;
using da::macros::doe::DoeDriver;

second one is included in the first one.
You also don't need it inside main() also.

How and where do i implement the two:

da::macros::doe::SpaceDefinition::~SpaceDefinition()
da::macros::doe::SpaceDefinition::SpaceDefinition()
Topic archived. No new replies allowed.