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

J

john.placais

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
 
V

Victor Bazarov

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
<cstddef> or <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
 
J

Jack Klein

It seems that somewhere somehow your compiler encounters two conflicting
definitions of 'size_t'. The only place I know where it should exist is
<cstddef> or <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>.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top