Click to See Complete Forum and Search --> : LNK 2001 : unresolved external symbol
ctyuang
May 21st, 1999, 04:34 AM
I have duplicated a Visual c++ class from other people source code. There is no any errors when I compile my source code, but error "LNK 2001: unresolved external symbol" ocurr when I build the exe file.
I wonder what is the problem. I guess it is because I just copy the .cpp and .h file of the class and paste it to my source code.
Anybody could please help me? thanx
ty
leolin@
May 21st, 1999, 04:36 AM
not include all necessary lib
Make sure that you copied everything over to the new file. You also want to make sure that you included all the header files. If parts of the class are in C you may have to use extern "C".
ksheeraj
May 22nd, 1999, 05:27 PM
Hi,
goto project->addfiles
and add obj or lib file that contain function implementation.
error will gies away
ksheeraj
39639,Leslie St.
Apt #157
Fremont USA 94538
Gordito Supreme
May 22nd, 1999, 07:41 PM
It sounds like you have not included a needed library.
The easiest (and least documented) way to do this is to got to the StdAfx header file and add the library ... for example if you are using wininet functions and need to include the wininet library:
#pragma comment(lib,"wininet.lib")
Most of the shell functions also require an additional library, which can be added to your project the same way, just check in the help documentation to find the library name.
Gordito
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.