Adding environment variable to system path

asked 2013-10-16 17:10:35 -0500

chughta1 gravatar image

Hi

I'm at the point where I have to enter "setx -m OPENCV_DIR D:\OpenCV\Build\x64\vc10", so I have the 64 bit version of windows but i'm not sure what compiler i have. When i run this command, command prompt says"SUCCESS:Specified value was saved" but when i check my D:\windows\system32 directory i cannot find the opencv folder and the path editor also says "D:\OpenCV\Build\x64\vc10\bin-- does not exist". Does anybody know whats going on? I have Visual studio 2012 installed and my OS is windows 7

Thanks

edit retag flag offensive close merge delete

Comments

2

Instead of using the command prompt, why don't you set the environment variables in the system properties itself . I have been always doing that, and it has been always successful. Moreover there is no need to check it in the system32 folder too. The steps are as follows

right click My Computer
click Properties
go to Advanced system settings
click on Advanced tab
click on Environment Variables
click on New...

Now you can define an environment variable, just type OPENCV_DIR in Variable name and in Variable value the path D:\OpenCV\Build\x64\vc10 and check it in path editor..

Robionic gravatar imageRobionic ( 2013-10-17 02:59:18 -0500 )edit

Hi

thanks for the reply. So I'm following the steps but that still doesn't solve the problem, path editor is still displaying the same message. For an environment variable, there are two types, user variable and system variable. I've tried adding the variables to both fields but it still doesn't work.

chughta1 gravatar imagechughta1 ( 2013-10-17 03:16:06 -0500 )edit

Entering in the system variable is enough. And in the path editor give it as %OPENCV_DIR%\bin .Then it should work. If you did the same..it should work.. Check the old installation in Windows link of OpenCV and follow the instructions again..

Robionic gravatar imageRobionic ( 2013-10-17 04:18:03 -0500 )edit

You are telling your system to take a look at all these variables, from within visual studio project settings. However, this path will not get added to D:\windows\system32, which would be wrong, because that is your windows installation and not your openCV installation. Why would you expect it to be there?

StevenPuttemans gravatar imageStevenPuttemans ( 2013-10-17 06:26:23 -0500 )edit