![]() |
[c++] linker errors
I am getting about 10 errors all of this type:
main.obj : error LNK2005: "struct HINSTANCE__ * myhInst" (?myhInst@@3PAUHINSTANCE__@@A) already defined in CTexture.obj I haven't been able to figure this out? Any suggestions? |
have you done a rebuild all? often link errors get cleared up that way.
otherwise my guess would be that you have myhInst defined more than once -- you probably need one class def in a header and an instance def in your cpp file. |
Maybe you forgot to declare inline on a function in a header file.
|
also make sure you're using macro guarding properly
|
If it's actually in two files, then only include the definition in one of them and add the extern keyword to it
For example: void myFunc(int param); would become... extern void myFunc(int param); |
All times are GMT -8. The time now is 07:01 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project