all groups > visual studio .net documentation > january 2004 >
You're in the

visual studio .net documentation

group:

Migration to VStudio 2003 from VS C++ 6


Re: Migration to VStudio 2003 from VS C++ 6 David Lowndes
1/15/2004 5:23:52 PM
visual studio .net documentation: [quoted text, click to view]

Clément,

Try disabling the /Wp64 (Detect 64-Bit Portability Issues) compiler
option in your project settings.

Dave
--
Migration to VStudio 2003 from VS C++ 6 Clément_Goux
1/15/2004 6:11:25 PM
Hello,

I try to migrate a program from VStudio C++6 to VStudio C++.NET.

The convertion from the C++6 project has been made by VS.NET.

This are some of the compilation error:

/********************************************************************/

d:\dev\Xvtdsc45\w32_x86\include\XVT_TYPE.H(54) : error C2040:
'LONG_PTR' : les niveaux d'indirection de 'long *' et de '__w64 long'
sont différents

d:\dev\Xvtdsc45\w32_x86\include\XVT_TYPE.H(55) : error C2040:
'ULONG_PTR' : les niveaux d'indirection de 'unsigned long *' et de
'__w64 unsigned long' sont différents

D:\dev\MSSQLSDK\DBLIB\INCLUDE\SQLFRONT.H(312) : error C2373: 'LPCBYTE' :
redéfinition ; modificateurs de type différents
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinSCard.h(43) : voir la déclaration de
'LPCBYTE'
\dev\idv\src\if2sv.c(1587) : warning C4244: '=' : conversion de 'long'
en 'unsigned short', perte possible de données
\dev\idv\src\if2sv.c(1839) : warning C4244: '=' : conversion de 'DBINT'
en 'unsigned short', perte possible de données

/********************************************************************/

I can't modify the source, because it was given by XVT and SQL Serveur.

I don't understand why the compilation works whit C++6 project and not
whit C++.NEt.

If anybody can help me. Tanks for your help.

--
Clément Goux
clement@b2web.fr <mailto:clement@b2web.fr>
Re: Migration to VStudio 2003 from VS C++ 6 Clément_Goux
1/16/2004 1:31:00 PM
Hello,

I have already tried to disable this option,
but it doesn't work. It works only for the warning.

I join the full Compilation output.

Isn't anywhere in the project, we can specify the number of byte for the
compilation ?

Clément

David Lowndes a écrit :
[quoted text, click to view]

--
Clément Goux
clement@b2web.fr <mailto:clement@b2web.fr>
Re: Migration to VStudio 2003 from VS C++ 6 David Lowndes
1/16/2004 1:34:31 PM
[quoted text, click to view]

Clément,

Give an example of an error (and the associated code) that persists
when you don't have the /Wp64 setting. I'd recommend that you re-build
your entire project after changing this setting - just to be sure!

Dave
--
Re: Migration to VStudio 2003 from VS C++ 6 Clément_Goux
1/16/2004 3:29:08 PM
Hello,

The file was generated whit out the /Wp64 option.

/*******************************************************************/

The Compilation options:
/Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "IX_XVT" /D "ID_DEBUG" /D
"IDOS_WIN32" /D "IF_CTREE" /D "ID_ARCH2T" /FD /EHsc /MLd /Zp1
/Fo"D:\dev\idv\obj\debug\ctree/" /Fd"D:\dev\idv\obj\debug\ctree/"
/FR"D:\dev\idv\obj\debug\ctree/" /W4 /nologo /c /ZI /TC

/*******************************************************************/

Source in XVT_TYPE.H:
typedef long *LONG_PTR;
typedef unsigned long *ULONG_PTR;

Error:
d:\dev\Xvtdsc45\w32_x86\include\XVT_TYPE.H(54) : error C2040:
'LONG_PTR' : les niveaux d'indirection de 'long *' et de '__w64 long'
sont différents
d:\dev\Xvtdsc45\w32_x86\include\XVT_TYPE.H(55) : error C2040:
'ULONG_PTR' : les niveaux d'indirection de 'unsigned long *' et de
'__w64 unsigned long' sont différents

/*******************************************************************/

Source in WinSCard.h:
#ifndef _LPCBYTE_DEFINED
#define _LPCBYTE_DEFINED
typedef const BYTE *LPCBYTE;
#endif

Source in SQLFRONT.H:
typedef const LPBYTE LPCBYTE ;

Error:
D:\dev\MSSQLSDK\DBLIB\INCLUDE\SQLFRONT.H(312) : error C2373: 'LPCBYTE' :
redéfinition ; modificateurs de type différents
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinSCard.h(43) : voir la déclaration de
'LPCBYTE'

/*******************************************************************/

Tanks,
Clément



David Lowndes a écrit :
[quoted text, click to view]

--
Clément Goux
clement@b2web.fr <mailto:clement@b2web.fr>
Re: Migration to VStudio 2003 from VS C++ 6 David Lowndes
1/16/2004 3:55:31 PM
[quoted text, click to view]

Ah, newer MS header files have their own definitions for LONG_PTR &
ULONG_PTR and they aren't pointers to long! MS define them as 32/64
bit platform independent values for "Signed long type for pointer
precision. Use when casting a pointer to a long to perform pointer
arithmetic.". The definitions in XVT_TYPE.H would be equivalent to
PLONG and PDWORD in MS header files.

Have you tried some judicious undefining of those symbols?

Have you checked if there are updates or FAQs from XVT that might
resolve the issue?

Dave
--
AddThis Social Bookmark Button