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++ / July 2006

Tip: Looking for answers? Try searching our database.

Converting from VS.net 2003 to VS.net 2005

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Adish Solanki - 11 Jul 2006 18:39 GMT
We have a MFC win32 desktop application written in Visual C++. We were using
Visula studio 2003 as the editor and everything was compiling, linking and
working fine. Since we want to move to .Net world, we are in process of using
Visual Studio 2005 instead of Visual studio 2003. During the conversion
process we have the following two issues:
1. We have included the afx.h before the afxwin.h in our source code files.
When we compile our code, we get the following ewrror message:

fatal error C1189: #error :  Building MFC application with /MD[d] (CRT dll
version) requires MFC shared dll version. Please #define _AFXDLL or do not
use /MD[d]    c:\program files\microsoft visual studio
8\vc\atlmfc\include\afx.h    24

As a fix we tried to make a seperate header file afxdlldef.h which said the
following:

#ifndef _AFXDLL
#define _AFXDLL
#endif

If we include this header file in our source code files, it compiles without
any error. But this approach requires changing every source code file to
include this new header file which we don't wish to do.  So we would like to
know if there is some other better approach to resolve this problem

2. MSDN help says that defining _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES as 1
will eliminate the warning by changing the strcpy call to strcpy_s. But when
we tried using this, we still get warnings for strcpy.

-Adish
Ted - 11 Jul 2006 20:38 GMT
you also need to define

_CRT_SECURE_NO_DEPRECATE
_CRT_NONSTDC_NO_DEPRECATE

See:

http://msdn2.microsoft.com/en-us/library/8ef0s5kh.aspx

Ted.

> We have a MFC win32 desktop application written in Visual C++. We were
> using
[quoted text clipped - 34 lines]
>
> -Adish

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.