link/compile error message

1>Trianglesmain.obj : error LNK2019: unresolved external symbol "public: void __thiscall Equilateral::printEqui(void)const " (?printEqui@Equilateral@@QBEXXZ) referenced in function _main

Getting this error message when compling/linking class, header and source files for class equilateral. Using MS Visual Studio latest version. ??
You don't appear to have implemented the class method void Equilateral::printEqui() const.
1>Trianglesmain.obj : error LNK2019: unresolved external symbol "public: __thiscall Equilateral::Equilateral(int)" (??0Equilateral@@QAE@H@Z) referenced in function _main
1>Trianglesmain.obj : error LNK2019: unresolved external symbol "public: __thiscall Equilateral::~Equilateral(void)" (??1Equilateral@@QAE@XZ) referenced in function _main
1>Trianglesmain.obj : error LNK2019: unresolved external symbol "public: void __thiscall Equilateral::printEqui(void)const " (?printEqui@Equilateral@@QBEXXZ) referenced in function _main

I have these functions declared in the .h file and defined in the .cpp file yet it appears system canot fnd them?

and ideas
There's nothing more anyone can conclude from the information you've provided.
A guess:

Maybe the function declaration and definition differ in the trailing const. In C++, these are two different functions:

1
2
void Equilateral::printEqui() const;
void Equilateral::printEqui() ;


I am guessing you might have had:

1
2
3
4
5
6
7
8
9
class Equilateral {
  public:
     void  printEqui() const;

};

void Equilateral::printEqui()  { // missing const

}



As kbw says, show us the code :+)

By the way, you don't have to use void for functions with no arguments, that is a C thing:

Equilateral::printEqui(void)const



> yet it appears system canot fnd them?
¿did you tell it where to look?
show your build command
http://www.cplusplus.com/forum/general/113904/
Topic archived. No new replies allowed.