You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your Windows build number: (Type ver at a Windows Command Prompt)
Microsoft Windows [Version 10.0.15063]
What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)
In order to replace Cygwin/MKS toolkit as a build environment on Windows it's important to be able to run the VS compiler from a bash shell/script. However, it looks like environment variables are not passed to child processes. I've tried a few processes:
johnd@Johnd-PC:~$ echo $TERM $JUNK
xterm-256color JD_JUNK
johnd@Johnd-PC:~$ cmd.exe
Unable to translate current working directory. Using C:\Users\johnd\Desktop
C:\Users\johnd\Desktop>echo %TERM% %JUNK%
%TERM% %JUNK%
C:\Users\johnd\Desktop>exit
johnd@Johnd-PC:~$ echo $TERM $JUNK
xterm-256color JD_JUNK
I'd expect variables set in bash to be visible in the cmd.exe process
johnd@Johnd-PC:/mnt/e/tmp$ export INCLUDE=.
johnd@Johnd-PC:/mnt/e/tmp$ cl.exe -c ./jd.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
jd.c
./jd.c(1): fatal error C1034: jd.h: no include path set
$INCLUDE needs to be passed in the environment to cl.exe
If I then examine the notepad process with sysinternals' "Process Explorerer" I can see that JUNK is not in its environment.
What's wrong / what should be happening instead:
So, (as per Linux processes), environment variables should be passed to WIN32 child processes. I appreciate that PATH might need to be translated in some fashion, but I don't think anything else should be (I think it's OK to expect the user to have translated things like $INCLUDE from my example).
The text was updated successfully, but these errors were encountered:
@johndaintree - Well... You could close this issue by using "close" button, below text area, left "comment" button, or leave it to member of this tracker :)
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.15063]
In order to replace Cygwin/MKS toolkit as a build environment on Windows it's important to be able to run the VS compiler from a bash shell/script. However, it looks like environment variables are not passed to child processes. I've tried a few processes:
I'd expect variables set in bash to be visible in the cmd.exe process
$INCLUDE needs to be passed in the environment to cl.exe
If I then examine the notepad process with sysinternals' "Process Explorerer" I can see that JUNK is not in its environment.
So, (as per Linux processes), environment variables should be passed to WIN32 child processes. I appreciate that PATH might need to be translated in some fashion, but I don't think anything else should be (I think it's OK to expect the user to have translated things like $INCLUDE from my example).
The text was updated successfully, but these errors were encountered: