Sign in to follow this  
tom_mai78101

LNK2019 error: Undetermined Class Error.

Recommended Posts

tom_mai78101    693
[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:

[quote]
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"][b]EDIT: The newer attachment is at Post #3 (below ryan20fun's post).
[/b][/color]
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.

Share this post


Link to post
Share on other sites
tom_mai78101    693
[quote name='ryan20fun' timestamp='1313316605' post='4848908']
i cannot load the project, the vcxproj file is missing,
can you upload it ?
[/quote]

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


[attachment=4934:Practice.zip]

Share this post


Link to post
Share on other sites
yckx    1298
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.

Share this post


Link to post
Share on other sites
tom_mai78101    693
[quote name='yckx' timestamp='1313386931' post='4849266']
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.
[/quote]

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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this