472,783 Members | 956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,783 software developers and data experts.

Converting from VS.net 2003 to VS.net 2005

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
Jul 11 '06 #1
1 7177
Ted
you also need to define

_CRT_SECURE_NO_DEPRECATE
_CRT_NONSTDC_NO_DEPRECATE

See:

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

Ted.

"Adish Solanki" <Ad**********@discussions.microsoft.comwrote in message
news:16**********************************@microsof t.com...
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

Jul 11 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andrew Ducker | last post by:
VS 2005 uses Partial Classes to keep the designer-generated code separate from the user-created code. Obviously VS 2003 doesn't. However, when converting from 2003 to 2005, it doesn't split the...
0
by: Rich | last post by:
(1) Is there a better place to pose the question below? (2) I am starting to convert my enterprise solution from VS 2003 (.NET v1.1.4322) to VS 2005 Professional (.NET v2.0.50727). The entire...
1
by: Friso Wiskerke | last post by:
Hi All, We've got an VS.2003 ASPNET (VB) webproject which we would like to convert to VS.2005 so that we can make use of the Master Page feature. Converting the initial pages to 2005 is not such...
1
by: Dan Munk | last post by:
Hello, I have a large project exclusively made up of interfaces (several hundred) that define the business objects used in our system. Heavy inheritance and aggregation are used in the project....
6
by: Dennis D. | last post by:
Having problems converting Murach's Beginning Visual Basic.net (Prince) and Microsoft Press' Programming Visual Basic.net (Balena) examples for use in VB.net 2005 Express. The VS conversion wizard...
1
by: Blasting Cap | last post by:
I had a copy of a project that was working in Visual Studio 2003 and Framework 1.1. After a computer crash, I was given VS 2005 and am having more than a little difficulty getting things to open...
0
by: Tom | last post by:
I am converting a small VB.NET 2003 application over to VS 2005. I ran it thru the 'upgrade' wizard which prompty upgraded it without any real issues (except some warnings). However, I did notice...
6
by: Nathan Sokalski | last post by:
I recently converted some ASP.NET 1.1 projects of mine, created with Visual Studio .NET 2003, to Web Application Projects in Visual Studio .NET 2005 so that I could use ASP.NET 2.0 (All my ASP.NET...
7
by: Coleen | last post by:
Does anyone have any good detailed information on the conversion process? We are in the process of converting 2 projects from 2003 to 2005 and have some conversion errors that I can not find...
4
by: Vadim | last post by:
Hello, I need to converting project that done on Visual Studio 2005 to Visual Studio 2003. What the best way to do this? Vadim Vilkhov
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.