LNK2019 error: Undetermined Class Error.

Started by
4 comments, last by yckx 12 years, 8 months ago
[I'm totally confused. Visual Studios 2010 would not allow me to compile my source codes due to an infamous undetermined LNK2019 "unresolved external error". It keeps saying:


1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall NewTriangle::~NewTriangle(void)" ([email="??1NewTriangle@@QAE@XZ"]??1NewTriangle@@QAE@XZ[/email]) referenced in function [email="_WinMain@16"]_WinMain@16[/email]
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall NewTriangle::NewTriangle(void)" ([email="??0NewTriangle@@QAE@XZ"]??0NewTriangle@@QAE@XZ[/email]) referenced in function [email="_WinMain@16"]_WinMain@16[/email]
[/quote]

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

[color="#ff0000"]EDIT: The newer attachment is at Post #3 (below ryan20fun's post).

The main problem is that, the NewTriangle is a class. A class that have all member functions defined in its CPP file. As for the main.cpp in the ZIP file, I commented out some lines, just to try and invoke the creation and deletion of NewTriangle class.

If the commented part were uncommented, then it would give 2 more LNK2019 errors to the same NewTriangle class, which is why I couldn't solve it out. So, I really don't know how to solve it, and I would like for some help. Tips would be awesome.
Advertisement
i cannot load the project, the vcxproj file is missing,
can you upload it ?

Never say Never, Because Never comes too soon. - ryan20fun

Disclaimer: Each post of mine is intended as an attempt of helping and/or bringing some meaningfull insight to the topic at hand. Due to my nature, my good intentions will not always be plainly visible. I apologise in advance and assure you I mean no harm and do not intend to insult anyone.


i cannot load the project, the vcxproj file is missing,
can you upload it ?


I have reupload the project again. Tell me if there's more missing files. :)


[attachment=4934:Practice.zip]
The new ZIP file still seems to be incomplete. The project contains core.h/core.cpp and triangle.h/trangle.cpp, which are all missing from the ZIP. And NewTriangle.h/NewTriangle.cpp are in the ZIP file, but are not part of the project when it is loaded up.

The new ZIP file still seems to be incomplete. The project contains core.h/core.cpp and triangle.h/trangle.cpp, which are all missing from the ZIP. And NewTriangle.h/NewTriangle.cpp are in the ZIP file, but are not part of the project when it is loaded up.


Wow! You found my problem! It was the VCXPROJ file that was outdated, which also caused Visual Studios 2010 to crash. And I thought my files were added correctly, yet I didn't check it, until now.

Thank you!
Glad to be of service ;)

This topic is closed to new replies.

Advertisement