473,804 Members | 3,809 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Conversion of 6.0 project to VS 2003

We have just started converting a large project from VisualStudio 6.0 to VisualStudio 2003. Of course, we're encountering some problems.

The first of which involves some CString() constructors not taking arguments that were valid in the 6.0 builds.

As a test, a created a simple 2003 project and inserted the following six lines of code in the stdafx.cpp file:
#include "stdafx.h"

TCHAR x = 't';
CString s(x);

UCHAR uc = 'u';
CString s2(uc);

WCHAR wc = 'w';
CString s3(wc);
and I get the following compiler error:

c:\Temp\TestDot Net2003\TestDot Net2003\stdafx. cpp(15): error C2668: 'ATL::CStringT< BaseType,String Traits>::__ctor ' : ambiguous call to overloaded function
with
[
BaseType=char,
StringTraits=St rTraitMFC_DLL<c har>
]
and
[
BaseType=char,
StringTraits=St rTraitMFC_DLL<c har>
]


If I try the same thing with the 6.0 compiler, I get the following results:

c:\documents and settings\stevek \my documents\shamr ockii_1_0\stdaf x.cpp(27) : warning C4244: 'argument' : conversion from 'unsigned short' to 'char', possible loss of data
WCHAR wc = 'w';
CString s3(wc); // offending line

If in the Stdafx.cpp file of the 2003 project, I right-click on CString and select the "Go To Definition", I goto line 103 of afxstr.h

typedef ATL::CStringT< TCHAR, StrTraitMFC< TCHAR > > CString;

and then if I again right-click on TCHAR and select "Go To Definition", I get to line 141 of tchar.h

#ifndef _TCHAR_DEFINED
#if !__STDC__
typedef wchar_t TCHAR; // line 141
#endif
#define _TCHAR_DEFINED
#endif
it appears that TCHAR has a typedef of wchar_t.

If I following the same steps ("Go To Definition") I get to:

#ifndef _TCHAR_DEFINED
typedef char TCHAR, *PTCHAR; // line 324 of WinNT.h
typedef unsigned char TBYTE , *PTBYTE ;
#define _TCHAR_DEFINED
#endif /* !_TCHAR_DEFINED */

Why is TCHAR being defined as wchar_t in the VS 2003 project?

Does anyone have a list of common problems and tips we could follow while in the process of converting a large project.

Any help would be appreciated.


Nov 17 '05 #1
3 3237
SteveK wrote:
Why is TCHAR being defined as wchar_t in the VS 2003 project?


TCHAR is either char or wchar_t, depending whether the project is MBCS
or Unicode. Go to the project's configuration properties, General,
Character Set, and set it to Use Multi-Byte Character Set if you don't
want Unicode. If you do want Unicode, you have to accept that TCHAR is
wchar_t.

Tom
Nov 17 '05 #2
>have a list of common problems and tips we could follow while in the process of converting a large project.

In the case of mathimatical functions you should typecast to float/double.
For the rest nothing much different compared to VC++ 6.0

Just make sure that you have a backup, because you cannot go back to VC++ 6.0. It is a one way transition.


Nov 17 '05 #3
Tom,

I already had "Use Mult-Byte Character Set" selected. Can you think of
anywhere else this could be comming from? That is TCHAR getting defined
wchar_t?

Thanks
"Tamas Demjen" <td*****@yahoo. com> wrote in message
news:eW******** ******@TK2MSFTN GP10.phx.gbl...
SteveK wrote:
Why is TCHAR being defined as wchar_t in the VS 2003 project?


TCHAR is either char or wchar_t, depending whether the project is MBCS or
Unicode. Go to the project's configuration properties, General, Character
Set, and set it to Use Multi-Byte Character Set if you don't want Unicode.
If you do want Unicode, you have to accept that TCHAR is wchar_t.

Tom

Nov 17 '05 #4

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

Similar topics

11
1715
by: Peter Oliphant | last post by:
I've been trying all morning to convert my 2003 project (managed) to 2005 (/clr since I have both managed and unmanaged code). I'm guessing I have tens of thousands of lines of code to change. Did a lot of converting '__gc' to 'ref', converting '*' to '^', converting 'new' to 'gcnew'. Of course this can't be done with a blanket replace, as my code has both managed and unmanaged segments. Thus I have to do them one-by-one. Also, things are...
2
1320
by: George Durzi | last post by:
Hey folks, I just installed VS .NET 2003 on top of Windows 2003 Server. I was opening a Web Project from source control, and got a warning that the project would have to be "converted", and that I could no longer edit it in older versions of Visual Studio. What does this conversion entail. It seems like a 1 way path.
5
1169
by: Tom | last post by:
We currently have a rather large application that is in VB.NET 2002. We have just purchased licenses to the 2003/1.1 Framework version of Visual Studio. What kind of conversion, if any, will we need to do to move our application over to the 2003/1.1 version? We will be moving this application over to production within a couple of months, and I don't want to push that down because I have to redo a bunch of stuff. However, I feel it is better...
9
1453
by: Vince | last post by:
Hi all, I am trying to convert a VB 6 application to VB.NET 2005 using the wizard. It has over 20 forms and I've used Option Explicit everywhere, hence variables are properly declared and used. I also made sure that there was no design time (ItemData) listings in the list. However, when I try to convert to .NET, two things happen: a) It gives me over 5500 errors!! (Many of them include 'could not resolve type' inspite of explicit...
2
1922
by: GW | last post by:
After the conversion and fixing some errs VS2005 threw, project ran OK. Opened xxx.vbproj file after the conversion to VS2005 from VS2003. Changed (usng wordpad) ../msbuild/2003 to 2005 thinking that should read 2005 Unable to open project after that. Chgd back to 2003. Unable to open. Err unable to read xxx.vbproj(218,16)
0
957
by: StanD | last post by:
Since last Dec I have been waiting for the update that will allow me to port my projects to 2005. I have installed the download, the available update to permit me to successfully do this. I have found that nothing has changed. The conversion process continues to ignore the 2003 project configuration and imports files and folders that are not part of the project, and attemps to build these components. Additionally, in Solution Explorer, ...
5
1410
by: JT | last post by:
Hi, I'm not sure where the problem is, but I think it's related to the .pdb file. I had a class library created in VS 2003 and decided to convert it to a VS 2005 project/solution. It seemed to go okay, and still was successful when building, but I later had to make a modification. When I tried, it wouldn't recognize the changes. I put in a breakpoint right before my modification and then when stepping through it, it jumped right...
4
2186
by: Coleen | last post by:
Hi All :-) I'm new to this site. I've been trying to convert several .Net 2003 web applications and getting tons of conversion errors. I found this site to help walk me through the conversion process: http://webproject.scottgu.com/VisualBasic/Migration2/Migration2.aspx which is great, however, when I follow the steps in this tutorial exactly, I get 102 conversion errors! Almost all the errors have to do with ambiguous file names, but...
0
1278
by: John | last post by:
Hi An outlook 2003 add-in solution created in vs 2008 on a pc with outlook 2007 when re-opened in vs 2008 brings up the conversion wizard. Cancelling wizard closes solution and does not allow to proceed. The development machine has Office 2007 installed but as production machines have Outlook 2003 therefore Outlook 2003 project template is selected for this solution. How can I avoid the conversion of the project?
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10569
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10325
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9140
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.