Sign in to follow this  
ChainChief

Visual C++ 2008 problem

Recommended Posts

I just got a new 64vista pc and downloaded Visual C++ 2008 Express Edition. When I try to run the default console program I get the following error message: Unable to start program 'C:\Users\Jacob\Documents\Visual Studio 2008\Projects\Test1\Debug\Test1.exe' The system cannot find the file specified. So far I have changed the Target machine to X64 from X86 but that didnt do anything. What else can I try?

Share this post


Link to post
Share on other sites
I've noticed a lot of people having the same problem. Ironically, I can find a single place where it sais whether Visual C++ is compatible/not compatible with Vista 64 bit. If not, Is there a better compiler that is?

Share this post


Link to post
Share on other sites
is it maybe the whitespaces in "Visual Studio 2008"?
Did u try copying the file to some other location or run it from command shell?


Best Jochen

Share this post


Link to post
Share on other sites
Quote:
Original post by ChainChief
When I try to run the default console program I get the following error message:

Unable to start program 'C:\Users\Jacob\Documents\Visual Studio 2008\Projects\Test1\Debug\Test1.exe'
The system cannot find the file specified.
Well, does that file exist?

Share this post


Link to post
Share on other sites
I Should have mentioned that. It does not exist. In fact, I did a search and could not find the executable anywhere. I dont know why it is not creating it when I compile.

Share this post


Link to post
Share on other sites
Quick question, I havent used visual in vista 64 bit but, is anything actually compiling in vista 64bit? You can grab gcc and execute the command line string that visual uses in a term and see what happens.

Share this post


Link to post
Share on other sites
Where is your project located, in the user directory? If not, it might be a UAC problem where it won't let a new file be created in a restricted folder.

I have UAC disabled on my x64 Vista and am running as administer and have not had any problems. Check your account privileges as well, you need Admin.

Share this post


Link to post
Share on other sites
Unfortunately, disabling UAC had no effect.

I found an article which goes into detail about getting VC2008 Express to compile, but it requires messing with the registry and moving files around. I am reluctant to do this, but I will try if there is no other option.

The article is here:
http://jenshuebel.wordpress.com/2009/02/12/visual-c-2008-express-edition-and-64-bit-targets/

Can someone assure me this is a valid procedure, or should I try something else?

Share this post


Link to post
Share on other sites
Quote:
Original post by Drew_Benton
I have UAC disabled on my x64 Vista and am running as administer and have not had any problems. Check your account privileges as well, you need Admin.
Good lord! Don't do that! You may as well be running in XP if you do that.

I can assure you that Visual Studio works on Vista 64-bit (I've been using it ever since Vista was released - I've even been using it on Windows 7 64-bit). That article you linked to is about getting 64-bit programs to compile on VS2008 express. I don't think that's what you're trying to do - you just want something to compile, right?

When you build your project, what does it say in the output window? My guess is you're getting compile errors...

Share this post


Link to post
Share on other sites
Thank you! That is good to hear.
However, everything in the output window looks fine when I compile.


1>------ Build started: Project: Test1, Configuration: Debug Win32 ------
1>Compiling...
1>Skipping... (no relevant changes detected)
1>Test1.cpp
1>Build log was saved at "file://c:\Users\Jacob\Documents\Visual Studio 2008\Projects\Test1\Test1\Debug\BuildLog.htm"
1>Test1 - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

It is just that when I run it(F5), The window pops up saying it cant find the executable -which really doesnt exist at all.

Share this post


Link to post
Share on other sites
This might be a silly question, but does the file exist under
c:\Users\Jacob\Documents\Visual Studio 2008\Projects\Test1\Release\
by any chance?

edit: nevermind, I read more closely after posting.

Share this post


Link to post
Share on other sites
What do you have set as the output file? You can check this by going to Project-> <name> Properties->Linker->General

Also check to make sure you're actually compiling an executable. To do this go to the project's properties again, but this time under Configuration Properties go to General, it should tell you your Configuration Type there.

Share this post


Link to post
Share on other sites
That looks like the output you get when you've selected a specific cpp file and click compile, there's no linker output.

you should have got
1>Linking...
in there at least.

What are you doing to actually build the project?

Share this post


Link to post
Share on other sites
Quote:
Original post by grekster
That looks like the output you get when you've selected a specific cpp file and click compile, there's no linker output.
Although pressing F5 should cause a build of the whole project.

ChainChief: Perhaps you can send us the contents of your BuildLog.htm file. Make sure you do a full build (from the "Build" menu, choose "Rebuild Solution" and then show us the resulting output window/BuildLog.htm file). I still suspect there's build errors...

Share this post


Link to post
Share on other sites
The fact that I see a
1>Skipping... (no relevant changes detected)
in there raises a red flag.

You should clean up your build directories and do a full rebuild of your application. Click Build -> Rebuild Solution. This will throw away any intermediate files and do a full rebuild. This might help.

Toolmaker

Share this post


Link to post
Share on other sites
Thanks everyone, I got it working.

I was compiling it from the build menu and then running it, but it never created the executable until I did a clean->rebuild->run. It was really that simple, and I didnt think of it because I never had to do that on my old pc.

Anyway, I appreciate all the help,
Jacob

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this