From: isenhand on
This should be a case of just finding the right lib to link to.

I get the following error:

error LNK2001: unresolved external symbol "public: static struct
CRuntimeClass const CWnd::classCWnd" (?classCWnd(a)CWnd@@2UCRuntimeClass@@B)

What lib should I link to to resolve this error?

For future referance, I have look for documentation that tells me what lib
for what function but couldn't find anything. Is there a way of find out that
information in case I run in to this problem again?

Thanks


From: Maxim S. Shatskih on
This is from MFC I think.

--
Maxim S. Shatskih
Windows DDK MVP
maxim(a)storagecraft.com
http://www.storagecraft.com

"isenhand" <isenhand(a)discussions.microsoft.com> wrote in message news:4A7004DF-B87B-4E9F-A2E8-8E9C3704941B(a)microsoft.com...
> This should be a case of just finding the right lib to link to.
>
> I get the following error:
>
> error LNK2001: unresolved external symbol "public: static struct
> CRuntimeClass const CWnd::classCWnd" (?classCWnd(a)CWnd@@2UCRuntimeClass@@B)
>
> What lib should I link to to resolve this error?
>
> For future referance, I have look for documentation that tells me what lib
> for what function but couldn't find anything. Is there a way of find out that
> information in case I run in to this problem again?
>
> Thanks
>
>
From: isenhand on
Thanks.

That was my guess too but I have gone though all the *.lib files in
C:\WinDDK\7600.16385.1\lib\Mfc\amd64 and still no link :(

Looks like I will just have to work my way though all the other libs till I
hit the right one.

"Maxim S. Shatskih" wrote:

> This is from MFC I think.
>
> --
> Maxim S. Shatskih
> Windows DDK MVP
> maxim(a)storagecraft.com
> http://www.storagecraft.com
>
> "isenhand" <isenhand(a)discussions.microsoft.com> wrote in message news:4A7004DF-B87B-4E9F-A2E8-8E9C3704941B(a)microsoft.com...
> > This should be a case of just finding the right lib to link to.
> >
> > I get the following error:
> >
> > error LNK2001: unresolved external symbol "public: static struct
> > CRuntimeClass const CWnd::classCWnd" (?classCWnd(a)CWnd@@2UCRuntimeClass@@B)
> >
> > What lib should I link to to resolve this error?
> >
> > For future referance, I have look for documentation that tells me what lib
> > for what function but couldn't find anything. Is there a way of find out that
> > information in case I run in to this problem again?
> >
> > Thanks
> >
> >
> .
>
From: isenhand on
I found a tool, dumpbin, and according to that CWnd::classCWnd forms part of
mfc42.lib.

Dump of file mfc42.lib

File Type: LIBRARY

Exports

ordinal name

1964 ?classCWnd(a)CWnd@@2UCRuntimeClass@@B (public: static struct
CRuntimeClass const CWnd::classCWnd)

However, if I add that to my source file:

MFC_LIBS=C:\WinDDK\7600.16385.1\lib\Mfc\amd64
....
TARGETLIBS=\
$(SDK_LIB_PATH)\strsafe.lib \
$(SDK_LIB_PATH)\kernel32.lib \
$(SDK_LIB_PATH)\advapi32.lib \
$(SDK_LIB_PATH)\oleaut32.lib \
$(MFC_LIBS)\mfcs42.lib \
$(MFC_LIBS)\mfcs42ud.lib \
$(MFC_LIBS)\mfc42ud.lib \
$(MFC_LIBS)\mfco42ud.lib \
$(MFC_LIBS)\mfcd42ud.lib \
$(WIN7_LIBS)\user32.lib

I still get the error:

error LNK2001: unresolved external symbol "public: static struct
CRuntimeClass const CWnd::classCWnd" (?classCWnd(a)CWnd@@2UCRuntimeClass@@B)


"Maxim S. Shatskih" wrote:

> This is from MFC I think.
>
> --
> Maxim S. Shatskih
> Windows DDK MVP
> maxim(a)storagecraft.com
> http://www.storagecraft.com
>
> "isenhand" <isenhand(a)discussions.microsoft.com> wrote in message news:4A7004DF-B87B-4E9F-A2E8-8E9C3704941B(a)microsoft.com...
> > This should be a case of just finding the right lib to link to.
> >
> > I get the following error:
> >
> > error LNK2001: unresolved external symbol "public: static struct
> > CRuntimeClass const CWnd::classCWnd" (?classCWnd(a)CWnd@@2UCRuntimeClass@@B)
> >
> > What lib should I link to to resolve this error?
> >
> > For future referance, I have look for documentation that tells me what lib
> > for what function but couldn't find anything. Is there a way of find out that
> > information in case I run in to this problem again?
> >
> > Thanks
> >
> >
> .
>
From: Tim Roberts on
isenhand <isenhand(a)discussions.microsoft.com> wrote:
>
>I found a tool, dumpbin, and according to that CWnd::classCWnd forms part of
>mfc42.lib.

OK.

>However, if I add that to my source file:
>
>MFC_LIBS=C:\WinDDK\7600.16385.1\lib\Mfc\amd64

With this line, you will not be able to build 32-bit binaries. Instead of
going to this trouble, eliminate all of the "mfc" libraries from your list,
and add this to your "sources":

USE_MFCUNICODE=1
--
Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.
 |  Next  |  Last
Pages: 1 2
Prev: GDI hook driver
Next: One driver for multiple OS