Solved

LNK2001 Error

Posted on 2000-04-01
1
545 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 8 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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Issue accessing member variable of atomic class 16 116
C language IDE – Compilers installation 14 71
C++ to C# code conversion issue 4 106
Least Squares Curve Fitting 4 77
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…
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 tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

770 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