Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

LNK2001 Error

Posted on 2000-04-01
1
Medium Priority
?
578 Views
Last Modified: 2007-10-18
I seem to keep getting errors on compilemfcwg32d.lib(CHGRID.OBJ) : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass  CWnd::classCWnd" (?classCWnd@CWnd@@2UCRuntimeClass@@A)
mfcwg32d.lib(CHCOMB.OBJ) : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass  CWnd::classCWnd" (?classCWnd@CWnd@@2UCRuntimeClass@@A)
mfcwg32d.lib(CHLIST.OBJ) : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass  CWnd::classCWnd" (?classCWnd@CWnd@@2UCRuntimeClass@@A)

its not my .lib, but i was wondering how to make the compiler ignore/fix these....Under vs97. i have all the include files .h, but not one single .cpp file eg chlist.cpp/chgrid.cpp, well you get it. Can i extract the .obj from the .lib?, than the .cpp files, or am i looking in the wrong direction?

ive been banging my head up against the wall for awhile. tried lib.exe, shows the .obj files
tried extracing /out but no avail.
/nologo /MT /W3 /GR /GX /O2 /I ".\include" /I ".\widgets\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp".\ace.rel/Ace.pch" /Yu"stdafx.H" /Fo".\ace.rel/" /Fd".\ace.rel/" /FD /c

some idea is better than nothing...can you plz advise me wht to do?

thanks in advance




0
Comment
Question by:dperrin
1 Comment
 
LVL 1

Accepted Solution

by:
Dhrubajyoti earned 24 total points
ID: 2706391
According to msdn help
there are two reasons this error occurs: what the code asks for doesn’t exist (the symbol is spelled incorrectly or uses the wrong case, for example), or the code asks for the wrong thing (you are using mixed versions of the libraries?some from one version of the product, others from another version).

you must have the library file (.lib )file for each header file.Because it will look for the functions in .lib file wile linking .if u have the .c or .cpp implementation file compiler will generate the .lib file .


 
 
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question