473,473 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Need help compiling 64-bit C++ Code in VS2005...

Hello generous helper!

I am trying to figure out how to port my code from 32-bit VC++ 6.0
to unmanaged C++ 64-bit VS2005. I have found the preprocessor
definition changes and the linker changes, but I get errors compiling,
like:

error C2371: 'size_t' : redefinition; different basic types

I get the feeling that I am doing something horribly wrong, even when I
try to make a "Hello World" program, its not working out for me in
64-bit... Does anyone have an unmanaged C++ VS2005 Project in 64-bit
that does "Hello World" just so I can see how it is done? Thanks!

- John

Aug 18 '06 #1
2 3362
jo**********@gmail.com wrote:
I am trying to figure out how to port my code from 32-bit VC++ 6.0
to unmanaged C++ 64-bit VS2005. I have found the preprocessor
definition changes and the linker changes, but I get errors compiling,
like:

error C2371: 'size_t' : redefinition; different basic types

I get the feeling that I am doing something horribly wrong, even when
I try to make a "Hello World" program, its not working out for me in
64-bit... Does anyone have an unmanaged C++ VS2005 Project in 64-bit
that does "Hello World" just so I can see how it is done? Thanks!
It seems that somewhere somehow your compiler encounters two conflicting
definitions of 'size_t'. The only place I know where it should exist is
<cstddefor <stddef.h>. You need to post your code so we can try it and
see. A better course of action would be to post to

microsoft.public.vc.language

since that's where they talk VC++ and where they can help you with your
compiler-specific issues. Do post your "Hello world" program, still.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Aug 18 '06 #2
On Fri, 18 Aug 2006 16:27:20 -0400, "Victor Bazarov"
<v.********@comAcast.netwrote in comp.lang.c++:
jo**********@gmail.com wrote:
I am trying to figure out how to port my code from 32-bit VC++ 6.0
to unmanaged C++ 64-bit VS2005. I have found the preprocessor
definition changes and the linker changes, but I get errors compiling,
like:

error C2371: 'size_t' : redefinition; different basic types

I get the feeling that I am doing something horribly wrong, even when
I try to make a "Hello World" program, its not working out for me in
64-bit... Does anyone have an unmanaged C++ VS2005 Project in 64-bit
that does "Hello World" just so I can see how it is done? Thanks!

It seems that somewhere somehow your compiler encounters two conflicting
definitions of 'size_t'. The only place I know where it should exist is
<cstddefor <stddef.h>. You need to post your code so we can try it and
see. A better course of action would be to post to
Actually, the type size_t is required to be defined in all of the
following, using the preferred C++ names:

<cstddef>, <cstdio>, <cstdlib>, <cstring>, <ctime>, and <cwchar>.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Aug 19 '06 #3

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

Similar topics

4
by: John Abel | last post by:
I'm having a bit of hassle, trying to compile Python in 64bit mode on Solaris8, using GCC 3.1/3.3 (tried both). I've set the relevant settings ( export CC="gcc -mcpu=v9 -m64...
0
by: tyousaf | last post by:
Hi i am new to mysql and mysql++, i have installed mysql server, it is running fine. i also installed "mysql++-1.7.9gcc3.2-2.i386.rpm" (i have gcc 3.3) , first of all as the readme file says to do...
5
by: Gernot Frisch | last post by:
class Q { public: template<class T>void foo(){} }; main() { Q q; q.foo<int>(); // error
5
by: dovgani | last post by:
I have an unmanaged MFC project. The output is static lib. I would like to compile using /clr option. The native lib size is 64 megs and with /clr and /O1 options is 940 megs. Is it possibly...
10
by: krunalb | last post by:
Hi, I am trying to shift unsigned long long value by 64 bits and this is what i get #include <stdio.h> int main() { unsigned short shiftby= 64;
1
by: ushasivaram | last post by:
hi, while compiling my build in REDHAT 9 i got the following error saying as: /modules/opensrc/openssl-0.9.8d/ssl sslhttp.c -o ../../../../../modules/system/ENTR-V4/lx/obj/sslhttp.o In file...
81
by: =?utf-8?B?4piG4piG4piG4piG4piGIFPDvCBLZWl0aCBDaGFr | last post by:
Installed this compiler on Vista; a simple "hello world" after compiled and run would pop-up a window "source file not compiled" I've seen this question asked a few times on Internet groups and...
1
by: broli | last post by:
How can this be done in windows based C compilers like PellesC ?? Is it possible to write a makefile or use the cc- o option as available in unix/linux ?? does anyone know of good makefile...
9
by: Verizon News Server | last post by:
Hi, I am a newbie with Javascript. I am trying to build a simple form that calculates the cost of gasoline for a trip. It simply divides the trip distance by the mpg and multiplies that by the...
0
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,...
0
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,...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.