| 1. |
Solve : Problem with a long PATH; PATH question :)? |
|
Answer» hi, I'm trying to create a file via Command Prompt and the program's file creation works grand when it is run from it's directory. However, when running from any directory... using PATH... it prints: mingw-w64 would install to C:\Program Files, not C:\Program Files (x86).Quote from: unregistered on January 28, 2019, 05:26:12 PM ...and the program's file creation works grand when it is run from it's directory. mingw-w64 is running from c:\Program Files (x86) because I installed the 32bit version. I want the exe to run on both 32bit and 64bit machines. And the directory is correctly written... have checked it many times. Note: I just opened "This PC" and entered the directory mentioned above and then clicked in the WHITE part in the right of the directory box and its path appeared... then after copying it (ctrl+c) and pasting it over the version I had typed out in the PATH, the same problem still EXISTS. I haven't created the 'dumb' drive partition yet. Quote from: Geek-9pm on January 28, 2019, 08:20:45 PM With long path names it is easy to make a mistake.Thank you! Specifically, I'll look into creating a 'dumb' drive partition as an alias for that specific directory... thank you so much! I've never heard or thought of a 'dumb' drive partition. edit. Quote from: unregistered on January 28, 2019, 05:26:12 PM Is that PATH folder correctly set up? [...] "\\?\C:\Program Files (x86)\mingw-w64\i686-8.1.0-win32-sjlj-rt_v6-rev0\mingw32\libexec\gcc\i686-w64-mingw32\8.1.0" but removed the \\?\ just now because that directory path is less than 256 characters.) The convention is to write PATH in capital letters when you are discussing your system's PATH environment variable. That is, the variable which is a string, a list of folders where the system will look for executables, by default starting C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem; (there are more folders, usually.) if you have totally replaced everything else, and just have that long folder path on your PATH, all kinds of trouble will happen. Is that what you meant? Or are you talking about a simple path to a folder? Most likely the error is with gcc and not windows. Thee are versions of gcc for Windows. Here is a video: https://www.youtube.com/watch?v=sXW2VLrQ3Bs Is this the compiler yu are using? If not, which? Where is the documentation? You can expect gcc has some rules about file names and DIRECTORIES that vary from what Windows allows. "mingw-w64 is running from c:\Program Files (x86) because I installed the 32bit version. I want the exe to run on both 32bit and 64bit machines. Really ? ? Quote from: patio on January 29, 2019, 03:46:30 PM "mingw-w64 is running from c:\Program Files (x86) because I installed the 32bit version. I want the exe to run on both 32bit and 64bit machines. It's a name. The mingw-w64 project is a complete runtime environment for gcc to support binaries native to Windows 64-bit and 32-bit operating systems. The -w64 doesn't mean it's 64-bit only. Quote from: Salmon Trout on January 29, 2019, 02:04:36 PM The convention is to write PATH in capital letters when you are discussing your system's PATH environment variable. That is, the variable which is a string, a list of folders where the system will look for executables, by default starting C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem; (there are more folders, usually.) if you have totally replaced everything else, and just have that long folder path on your PATH, all kinds of trouble will happen.When I wrote "PATH folder" I was trying to refer to the folder path, that I had posted, that was part of my PATH (it's much longer). Sorry, I'll try to be more careful next time. Quote from: Geek-9pm on January 29, 2019, 03:38:22 PM Most likely the error is with gcc and not windows.Yes, I'm using gcc. Thank you for the video too. It never occurred to me that gcc would have its own rules about file names and directories. hmm... ooh: Their installer created the directory and I would imagine the mingw-w64 installer wouldn't commit suicide... but, I'm definitely not an expert; just trying to install this correctly. Quote from: Salmon Trout on January 29, 2019, 03:54:44 PM It's a name. The mingw-w64 project is a complete runtime environment for gcc to support binaries native to Windows 64-bit and 32-bit operating systems. The -w64 doesn't mean it's 64-bit only.Yes, I chose to install the latest/newest version of mingw, the mingw-w64 version they recommended on mingw's site, because it's probably the most up-to-date. That and 64bit processors are comfortable with running 32bit applications... and after learning that I could install a 32bit version, I was sold. Thank you so much Geek-9pm! I followed the instructions on the video you linked and everything works now! After downloading and installing the mingw-get-setup.exe, I removed the two directory paths I had added to my PATH before adding the simple path the video told me to add... and it works excellently now !in any directory! note: in case anyone's windows 10's right click on start menu and then clicking System-doesn't bring up the correct window... click start and begin typing "Control Panel"... run that app and click "System" edit: Yes, I realize that this is the mingw last updated in 2013, but it works extremely grand so far... so I'm happy. I'm keeping mingw-w64, for right now at least. And... above I said that I had downloaded mingw-w64 from mingw's site... but, sorry for my mistake, I think I actually chose the mingw-w64 site when both were shown in duckduckgo since mingw-w64 is NEWER. Glad you got it right! |
|