By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,161 Members | 1,098 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,161 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.