468,512 Members | 1,519 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

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 3159
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by John Abel | last post: by
reply views Thread by tyousaf | last post: by
5 posts views Thread by Gernot Frisch | last post: by
10 posts views Thread by krunalb | last post: by
81 posts views Thread by =?utf-8?B?4piG4piG4piG4piG4piGIFPDvCBLZWl0aCBDaGFr | last post: by
1 post views Thread by broli | last post: by
9 posts views Thread by Verizon News Server | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.