C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

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

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Sat Aug 19, 2006 1:56 am    Post subject: Need help compiling 64-bit C++ Code in VS2005... Reply with quote



{ reminding everybody to try to give non-environment specific answers
if possible, otherwise the poster should probably ask in the
'microsoft.public.vc.language' newsgroup, which has already been
suggested in c.l.c++ where the same post appeared earlier. -mod }

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


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Back to top
Jeffrey Schwab
Guest





PostPosted: Sun Aug 20, 2006 5:34 am    Post subject: Re: Need help compiling 64-bit C++ Code in VS2005... Reply with quote



john.placais (AT) gmail (DOT) com wrote:
Quote:
{ reminding everybody to try to give non-environment specific answers
if possible, otherwise the poster should probably ask in the
'microsoft.public.vc.language' newsgroup, which has already been
suggested in c.l.c++ where the same post appeared earlier. -mod }

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!

Without referring to the specifics of setting up a project in your
environment, I can tell you that the process for starting a new
project is similar among many IDEs. You'll have to choose
File->New->Project, then choose the appropriate project type, and give
the project a name. When you choose the project type, be sure to
select the correct language -- it should have C++ in the name -- and a
suitable template, which may be something like "Console Application."
Take the default options for any wizard that pops up, but choose to
start with an "Empty Project" if you are given such an option.

Once the project has been created, you'll have to find a widget that
lets you view a tree of the files used in your project. If you were
able to start with an empty project, there will be no files yet. Add
an item, specifically a file of type "C++ source code" or the like, to
be called main.cpp or main.cc. The file should be empty, but if it's
not, just erase whatever junk the IDE inserted. Then paste in this
code:

#include <iostream>
int main() {
std::cout << "hello, world\n";
}

Save your file and build your project. If there are no errors, run
the program, using a menu item. On some IDEs, the menu item to run a
program without debugging it will be in a poorly named menu like
Debug.

If you don't want to deal with all this hassle, you may want to switch
to a command-line environment. One advantage of your IDE over (e.g.)
Eclipse is that it actually comes with a decent set of command-line
tools.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Back to top
Alf P. Steinbach
Guest





PostPosted: Sun Aug 20, 2006 5:34 am    Post subject: Re: Need help compiling 64-bit C++ Code in VS2005... Reply with quote



* john.placais (AT) gmail (DOT) com:
Quote:
{ reminding everybody to try to give non-environment specific answers
if possible, otherwise the poster should probably ask in the
'microsoft.public.vc.language' newsgroup, which has already been
suggested in c.l.c++ where the same post appeared earlier. -mod }

Uh, you leave us little room to mænouver in...


Quote:
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

Seems to indicate that you have tried to link 64-bit code with 32-bit code.

Try to build /all/ of the code from scratch, with same configuration of
compiler and linker.


Quote:
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!

Please ask this last question -- how to use your tools to compile and
link a program -- in a Microsoft or Microsoft-oriented group.

It's off-topic in [clc++m].

In addition to the moderator's suggestion, of the general Usenet groups,
[comp.os.ms-windows.programmer.win32], mentioned in the FAQ, serves
(also!) as useful forum for Visual C++ specific questions.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.