# MEH! ...problem with LINKING...plz help

This topic is 4429 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi everyone, sorry, but I'm new to C++ and I can never seem to understand where/what my problem is when it comes to LINKING errors... Could somone please tell me WHAT this kind of error is? Also, I have the following errors, so please give me any suggestions as to what it may be... NOTE: I'm trying to make a Tetris clone...
Linking...
main.obj : error LNK2001: unresolved external symbol "public: __thiscall BitMapObject::BitMapObject(void)" (??0BitMapObject@@QAE@XZ)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall BitMapObject::~BitMapObject(void)" (??1BitMapObject@@QAE@XZ)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall BitMapObject::operator struct HDC__ *(void)" (??BBitMapObject@@QAEPAUHDC__@@XZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall BitMapObject::Load(struct HDC__ *,char const *)" (?Load@BitMapObject@@QAEXPAUHDC__@@PBD@Z)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall BitMapObject::Create(struct HDC__ *,int,int)" (?Create@BitMapObject@@QAEXPAUHDC__@@HH@Z)
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/main.exe : fatal error LNK1120: 6 unresolved externals

main.exe - 7 error(s), 0 warning(s)


##### Share on other sites

I'm using Visual Studio 6 (VC++) and made project with Win32 Application (blank template)

...if that helps any...

##### Share on other sites
The first five erros seem to indicate that you declared a class and didn't add the class member function definitions to the project. The sixth error indicates that you either are creating a console project and didn't define your main() function, or you are writing a window application and accidently created a console project instead. If the latter problem go your project settings, and linker options and change the subsystem from console to winodws. If the first, create a main() function.

##### Share on other sites
A linker error of this sort (undefined symbol) indicates that you are making calls to a function for which no function body has been defined.

From the log you posted (which by the way you should post between source tags... see forum FAQ for this), you have declared in .h files but not defined in .c/.cpp files the following in the BitMapObject class:

- the constructor
- the destructor
- Create()

If these already exist in a source file, the likelihood is that you have not included this source file in your Visual Studio project.

1. 1
2. 2
JoeJ
20
3. 3
4. 4
frob
12
5. 5

• 10
• 13
• 21
• 13
• 20
• ### Forum Statistics

• Total Topics
632195
• Total Posts
3004703

×