Computer Hope

Software => Computer software => Topic started by: Computer Beginner on April 17, 2009, 06:36:58 AM

Title: Urgent Help Needed
Post by: Computer Beginner on April 17, 2009, 06:36:58 AM
I have a Vista computer. I went to the microsoft website and downloaded 'Visual c++ 2008 express edition'.

The setup came up. It began downloading all of the 9 different components (96mb in total). It did this and once it had finished (without me doing anything) it proceeded to install each of the components. But it does not work and I get this error message:

Setup could not install the following component:

Microsoft .NET Framework v3.5 SP1

Setup did not attempt to install the following components:

then it lists the other 7 components, so I think it must have installed the first component.

Can anybody help me? All I want to do is create C++ programs using visual c++ 2008 express edition, on my vista computer.
Title: Re: Cannot Install Visual C++ 2008 Express Edition on Vista
Post by: Computer Beginner on April 17, 2009, 10:12:25 AM
this is urgent =[
Title: Re: Urgent Help Needed
Post by: patio on April 17, 2009, 03:24:34 PM
All PC issues are urgent...

That being pointed out try DLoading the standalone .NET 3.5 framework standalone version...re-boot afterwards and retry the install of Visual.

DISCLAIMER: There are known issues with .NET 3.5 so look for any patches/updates as well...
Title: Re: Urgent Help Needed
Post by: kamz1245 on April 18, 2009, 05:01:57 AM
re-boot afterwards instation
Title: Re: Cannot Install Visual C++ 2008 Express Edition on Vista
Post by: Dias de verano on April 18, 2009, 05:10:31 AM
this is urgent =[

That is a really bad way of getting help, because many people will now ignore you.
Title: Re: Urgent Help Needed
Post by: patio on April 18, 2009, 07:08:03 AM
re-boot afterwards instation

Look up... ::)
Title: Re: Urgent Help Needed
Post by: Computer Beginner on April 19, 2009, 04:01:01 AM
Thank you very much for your help.

Downloading the net framework worked! I can now run visual c++.

I still have one problem though. When I create a new cpp source file, and try to compile it on the visual studio command prompt, using 'cl /EHsc filename.cpp', it always returns the message
Code: [Select]
c1xx : fatal error C1083: cannot open source file: 'filename.cpp': no such file or directory. However it definitely exists and the code is all correct.

I tried typing
Code: [Select]
cd directoryoffile and it worked, but everytime I go back to the command prompt it has reset the path(is that what you call it - the bit where it says C:\Program Files\.....).

I don't want to have to change it every time, so is there any way I can set it to always have the right directory or just make it work :S?
Title: Re: Urgent Help Needed
Post by: Dias de verano on April 19, 2009, 04:03:35 AM
Have you tried using the full path to the .cpp file?
Title: Re: Urgent Help Needed
Post by: Computer Beginner on April 19, 2009, 04:11:54 AM
Do you mean typing 'cd C:\Documents\Folder'?

I have tried that typing the full directory of the the file and it works, but it resets every time to the old directory/path.
Title: Re: Urgent Help Needed
Post by: Dias de verano on April 19, 2009, 04:21:05 AM
Do you mean typing 'cd C:\Documents\Folder'?

I have tried that typing the full directory of the the file and it works, but it resets every time to the old directory/path.

I mean use the full path at the visual studio command prompt e.g.

cl /EHsc "C:\whatever\whatever\filename.cpp"

Or create a batch file like this

cd /d "C:\The Folder\I want to\be in"

and save it on the desktop

Title: Re: Urgent Help Needed
Post by: Computer Beginner on April 19, 2009, 04:36:12 AM
Trying your first option gave me the same error message.

I tried making the batch file with exactly what you wrote in it, but it closes immediately (i'm guessing this is a noob error), so......I don't think either have worked. =S
Title: Re: Urgent Help Needed
Post by: Dias de verano on April 19, 2009, 05:08:20 AM
Sorry, should have tried it first!

Copy and paste this into Notepad (changing the path and folder of course!) noting the quotes and spaces and save as a batch file on the desktop

Code: [Select]
start "" "cmd /k cd /d C:\The Folder\Where I\Want to be"
Title: Re: Urgent Help Needed
Post by: Computer Beginner on April 19, 2009, 05:15:28 AM
OK, thanks.

When I open this it has my directory in it, but when I type
Code: [Select]
cl /EHsc file.cpp it says 'cl is not recognized as an internal or external command, operable program or batch file.'.

=0 =0
Title: Re: Urgent Help Needed
Post by: Dias de verano on April 19, 2009, 05:16:27 AM
 is the folder the same as this?

Quote from: You, before
directoryoffile

Because you wrote

Quote from: You, before
I tried typing

cd directoryoffile

and it worked,

So you should be in the same folder, and it should work just the same
Title: Re: Urgent Help Needed
Post by: Computer Beginner on April 19, 2009, 05:24:15 AM
Yes it is definitely the same folder.

It is weird. It just doesn't recognize the 'cl' command.
Title: Re: Urgent Help Needed
Post by: Dias de verano on April 19, 2009, 05:29:31 AM
Yes it is definitely the same folder.

It is weird. It just doesn't recognize the 'cl' command.

Let's start at the beginning. How were you doing this before?

Quote from: You
When I create a new cpp source file, and try to compile it on the visual studio command prompt, using 'cl /EHsc filename.cpp',

How did you get to the "visual studio command prompt"?

Title: Re: Urgent Help Needed
Post by: Computer Beginner on April 19, 2009, 06:01:29 AM
I open up the visual C++ express edition 2008

File>open>file.cpp

tools>visual studio command prompt
Title: Re: Urgent Help Needed
Post by: Dias de verano on April 19, 2009, 06:05:52 AM
Maybe some tips here

http://www.devsource.com/c/a/Using-VS/Working-at-the-Visual-Studio-Command-Line/

Title: Re: Urgent Help Needed
Post by: Computer Beginner on April 19, 2009, 06:27:28 AM
It says this:

Quote
You might think that accessing the command line is a simple matter of clicking the Start\Programs\Accessories\Command Prompt shortcut. That shortcut opens a command prompt, but it's not the right one. This command prompt lacks the required environment variables, especially the path information to Visual Studio.

so that must mean that the batch file created on my desktop won't work. I can get to the visual studio command prompt and make it work by typing cd /directory and then compiling, it is just a matter of setting it so it always has the right directory =s.


Title: Re: Urgent Help Needed
Post by: Dias de verano on April 19, 2009, 06:33:18 AM
There ya go. I didn't know that either...

Title: Re: Urgent Help Needed
Post by: Computer Beginner on April 19, 2009, 08:24:15 AM
I still don't know how to set the command prompt to the correct directory. =S

Thanks for your help though!
Title: Re: Urgent Help Needed
Post by: Dias de verano on April 19, 2009, 08:44:12 AM
So are you always going to keep your cpp files in the same directory? Surely you are going to create a different directory for each new project?
Title: Re: Urgent Help Needed
Post by: Computer Beginner on April 19, 2009, 08:51:32 AM
Well I guess I probably will.

In that case...it's fine! It isn't much of a problem typing one line anyway.

Thanks for all your help!