From: Omnix on 15 May 2008 03:51 I used global variant afxGlobalUtils of MFC9.0 (VS2008+Feature Pack) in my MFC extension dll like this: HICON hIcon = afxGlobalUtils.GetWndIcon(pWnd); But when i compile, there is a link error: error LNK2001: unresolved external symbol "class CGlobalUtils afxGlobalUtils" (?afxGlobalUtils@@3VCGlobalUtils@@A) Does any .lib file neet to be added to project?
From: Giovanni Dicanio on 15 May 2008 05:23 "Omnix" <Omnix(a)discussions.microsoft.com> ha scritto nel messaggio news:79A5E3F3-3163-4566-AC50-493A9AD42E2E(a)microsoft.com... >I used global variant afxGlobalUtils of MFC9.0 (VS2008+Feature Pack) in my > MFC extension dll like this: > HICON hIcon = afxGlobalUtils.GetWndIcon(pWnd); > > But when i compile, there is a link error: > error LNK2001: unresolved external symbol "class CGlobalUtils > afxGlobalUtils" (?afxGlobalUtils@@3VCGlobalUtils@@A) I searched in my VS2008 + FP installation, and found that afxGlobalUtils is defined in file 'afxglobalutils.cpp' (line 37). CGlobalUtils afxGlobalUtils; ....maybe you should add that file to your project? Giovanni
From: ChrisN on 15 May 2008 07:52 On Thu, 15 May 2008 00:51:00 -0700, Omnix <Omnix(a)discussions.microsoft.com> wrote: >I used global variant afxGlobalUtils of MFC9.0 (VS2008+Feature Pack) in my >MFC extension dll like this: >HICON hIcon = afxGlobalUtils.GetWndIcon(pWnd); > >But when i compile, there is a link error: >error LNK2001: unresolved external symbol "class CGlobalUtils >afxGlobalUtils" (?afxGlobalUtils@@3VCGlobalUtils@@A) > >Does any .lib file neet to be added to project? Hi Omnix, I've just tried this in my project and got the same error. If you change you change your project settings to link statically against MFC, the error goes away. Looks like a bug in MFC 9.0 - I'd suggest reporting this at http://connect.microsoft.com. Chris
From: ChrisN on 15 May 2008 08:52 On Thu, 15 May 2008 12:52:07 +0100, ChrisN <chrisn303(a)nospam.googlemail.com> wrote: >I've just tried this in my project and got the same error. If you >change you change your project settings to link statically against >MFC, the error goes away. > >Looks like a bug in MFC 9.0 - I'd suggest reporting this at >http://connect.microsoft.com. afxGlobalUtils is not documented on MSDN, so it looks like this class is intended only for use internally within MFC, not from user code. http://msdn.microsoft.com/en-us/library/bb984499.aspx Chris
|
Pages: 1 Prev: linking with mfc42.lib and mfc90.lib? Next: CMFCDesktopAlertWnd |