5

I added an environment variable "qt" with the value "C:\qt\4.3.4\bin" and also added the path in system variable. the path had the below value and I added new value "C:\qt\4.3.4\bin" to the end of it. but still it doesn't work , any idea what's the problem ?

"C:\Program Files (x86)\Java\jre6\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin;C:\Program Files (x86)\IBM\RationalSDLC\common;C:\qt\4.3.4\bin"
5
  • In which way it doesn't work? Commented Oct 18, 2013 at 7:49
  • the code that I run use it. so right now the code doesn't work and gives me errors regarding this qt(couldn't find qt file required which is in C:\qt\4.3.4\bin path). It is obvious that the environment variable doesn't work! Commented Oct 18, 2013 at 7:53
  • has the code been written by you? The problem is dll loading? Commented Oct 18, 2013 at 8:03
  • I don't think that the problem is loading dll files. I recently changed my windows and everything worked before quite well without any problem Commented Oct 18, 2013 at 8:12
  • If the path variable is set and you can, from anywhere, run exe files included in bin directory without indicating the path, then path variable is working. But i dont know how the code is trying to find the files. If it depends of a hardcoded path, the path variable will not solve the problem by itself. Commented Oct 18, 2013 at 8:20

4 Answers 4

6

This problem occurs because windows has a limit of 1024 or 2048 chars length in PATH variable. I wrote a small application to take care this problem and reduce unnecessery text from the PATH environment variable in windows 7. It simply removes duplicates and removes paths that are no longer valid.

you can try it out here: https://github.com/AsafShochet/Environment-Path-Variable-Minimizer

Sign up to request clarification or add additional context in comments.

Comments

1

Remember to close and re-open the command prompt after applying changes to environmental variables!!!!

Comments

0

If those *** are literally in your PATH variable value, I think that's the problem.

Check that C:\qt\4.3.4\bin exists (and has the executables or DLLs you need) and put it in your path without any strange asterisks.

3 Comments

no their not , I wanted to show where I added that and just emphasize more ;) and C:\qt\4.3.4\bin exists and has the executables.
If you start a new command prompt (cmd), does it see the new PATH value (echo %PATH%) and enable you to run the QT executables?
Well, the PATH variable is OK, then.. so it really depends on what your specific error is. See: google.com/search?q=qt+environment+variables+windows
0

I am using this application to see the Environment Variables. And I have discovered they have a listing of Windows environment variables on one of the pages. It makes quite easy to reduce the path, to use the variable name for part of the name.

HTH

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.