Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2006

Tip: Looking for answers? Try searching our database.

Static MFC in DLL (linker error)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ac2806 - 16 Aug 2005 17:25 GMT
Hi
I want to use the static MFC within a dll, but I get the following errors
when linking:
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv

nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc

nafxcwd.lib(apphelp.obj) : error LNK2001: unresolved external symbol
__mbctype

nafxcwd.lib(filelist.obj) : error LNK2001: unresolved external symbol
__mbctype

nafxcwd.lib(viewedit.obj) : error LNK2019: unresolved external symbol
__mbctype referenced in function "protected: long __thiscall
CEditView::OnFindReplaceCmd(unsigned int,long)"
(?OnFindReplaceCmd@CEditView@@IAEJIJ@Z)

When I specifiy _AFXDLL in the preprocessor settings the project compiles
correctly, but on program execution, the MFC71D.dll is still required, as
when using the shared dll mfc.

I tried to solve the problem by using /NODEFAULTLIB: nafxcwd.lib (as it was
described in an previous thread), but then I even get more errors.

Does somebody have an idea?

thanks
Alex
Kyle Alons - 16 Aug 2005 22:23 GMT
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q148652

Signature

---------------------------------------------------
Automate your software builds with Visual Build Pro
http://www.visualbuild.com/

> Hi
> I want to use the static MFC within a dll, but I get the following errors
[quoted text clipped - 27 lines]
> thanks
> Alex
ac2806 - 17 Aug 2005 09:21 GMT
Thanks for the link, but as I wrote before, when I try to ignore the lib
(nafxcwd.lib) by specifying it in "Properties/Linker/Input/Ignore Specific
Libraries", it get even more linker errors.
I also tried to add msvcrtd.lib but this also didn't help.

Any futher suggestions?

> http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q148652
>
[quoted text clipped - 29 lines]
>> thanks
>> Alex
Arvind Kumar - 10 Mar 2006 07:26 GMT
Change  In "Configration property "->"C/C++"->"Code Generation"->"RunTime
Library" to Multi-threaded (/MT)

Hope it will solve your problem

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.