Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to compile a code in software which is needed to call visual c++;My Os is windows cp professional; I've installed visual studio professional v10.but it still shows an error message indicating "check if bin directory of your visual c++ is included in the path environment variable", where this action must be done?


I added that Path but now it says " Check that Visual C++ has been installed correctly" how I gotta check? I executed a program in Visual C++ and it s working nicely.

share|improve this question
    
Duplicate question, for answer, see: superuser.com/questions/163891/environment-variables-windows7/… – Tom Wijsman Aug 11 '10 at 14:27
    
Those instructions are not very good. – paradroid Aug 11 '10 at 14:28
    
Nothing wrong with those instructions, although I didn't know of setx. – Tom Wijsman Aug 11 '10 at 14:42
    
I think it is hard to edit long environmental variables in that GUI and it also seems a bit perverse! – paradroid Aug 11 '10 at 14:50
up vote 3 down vote accepted

Go to

System Properties (press windows key + pause/break)
Advanced
Environment Variables
System variables

Add the required path there

share|improve this answer

In a CMD prompt, type:

path

To add to your user account path:

setx path "%path%;C:\foo"

For the system path:

setx path "%path%;C:\foo" -m
share|improve this answer
    
I added that Path but now it says " Check that Visual C++ has been installed correctly" how I gotta check? I executed a program in Visual C++ and it s working nicely. – user44509 Aug 11 '10 at 16:04
    
%PATH% contains both user and machine components of the environment variable PATH. Running e.g. the command setx path "%path%;C:\foo" -m will effectively merge the two which is undesirable in most cases. Aside from that it will also overwrite the unexpanded paths with expanded ditto (%SYSTEMROOT%\System32 becomes e.g. C:\Windows\System32). – mandrake May 31 '12 at 8:26
    
@mandrake: Yes, you're right. It would be better to echo %PATH% | clip to get the path into the clipboard, edit it in Notepad and then use the full unexpanded path (with no duplicates) in the command above instead. – paradroid May 31 '12 at 9:20

Your visual studio installation should have added a menu item for under Tools for the VS 2008 command prompt - this will usually set the appropriate environment for you.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .