My Visual Studio quit working, probably sabotaged by MS to force me to pay $$$$ for the newest version. I decided to use GNU instead, of which I was very fluent 10+ years ago.
The newest version prefers that I install Cygwin first, which I did without issue. However, when I try to build the compiler, I get errors because of directory references that use my real name; an embedded space in ‘firstname lastname’ in some cases truncates the string and causes errors.
Long ago, I knew the commands in both MSDOS/Windows and Linux both to read and define environment variables, but I’ve slept since then. What commands do I use to find where my name is defined and change it to something that won’t choke the build script?
SET name=value (Be sure to NOT have blank spaces around the equal sign!)
In Unix/Linux, depends on what shell you are using. The standard Bourne shell and all its clones and upgrades (including the modern bash shell), it is simply:
name=value
but that is strictly local to the current shell process (i.e., it doesn’t automatically become an environment variable) and will not be seen by any programs you run from that shell. To make that happen, follow the name=value statement with:
export name (Now it’s an environment variable that will be seen by programs that you run.)
ETA:
To view the value of all environment variables:
In DOS, it’s just SET with no arguments, IIRC.
In Bourne shell, IIRC, it’s env
(Hope I’m remembering all this right. I’ve been away from it for a few years too.)
More ETA: What the hell, I’m working on a Linux machine right now as I type this. I just opened a command prompt (bash) and tried it. env it is.
I used env in the Cygwin window to redefine HOME to have double quotes around the equivalence string. Don’t know if it has worked because I haven’t hit the MAKE phase of building the compiler yet.
I’d probably create a symlink (either a NTFS junction or a NTFS symlink) to my home directory with a non-spaced path name, and redefine HOME to use that path.
I’d consider that somewhat safer than relying on double-quotes, but YMMV.
As for Visual Studio - I downloaded VS 2013 at home and and happily using it for free - you just need to sign up to a Visual Sourcesafe online account or some-such. It doesn’t bug me at all. I’ve just spent a few weeks coding some audio dsp stuff in C++ (which I don’t really know very well), and trying to do that in gcc and a text editor would have killed me.