?
Solved

LNK2001 Error

Posted on 2000-04-01
1
Medium Priority
?
566 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: 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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
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…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

752 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