views:

226

answers:

1

So I am trying to run console 64 bit Hello World program.

I have Windows 7 Enterprise x64 bit version.

I have installed Visual Studio 2008 and have added all of components needed for 64 bit.

I want to create simple console application.

It turns out to be a problem.

I have simple standard hello world project.

I have created it using New Project -> Empty project. I added main.cpp that contains this:

#include <iostream>

using namespace std;

int main()
{
cout << "howdy\n";
}

I added new configuration to the project by clicking on Config Manager and added x64 config. Compiled and it compiles.

Tried running it and cmd.exe shoots up with following error:

"The application has failed to start because its side-by-side configuration is in correct. Please see the application event log or use the command-line sxstrace.e xe tool for more detail. Press any key to continue . . . "

Which set-up step if any I am missing. What am I doing wrong and how should I go about setting simple console hello world in 64 bit world.

Thanks for any help

+2  A: 

Instead of starting with an Empty Project, choose a project of type "Console Application" in Visual Studio.

Russ Clark
but that one is called win32 console app ?i dont see why would that be the one for x64but oh well it works so thanks
grobartn
win32 is the name of the API that was developed for the first 32-bit windows. The 64-bit version is still called win32.
Cogwheel - Matthew Orlando