Install GCC in Git for Windows bash environment The 2019 Stack Overflow Developer Survey...
Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?
How to support a colleague who finds meetings extremely tiring?
Button changing its text & action. Good or terrible?
Is 'stolen' appropriate word?
What information about me do stores get via my credit card?
should truth entail possible truth
Can I visit the Trinity College (Cambridge) library and see some of their rare books
Why don't hard Brexiteers insist on a hard border to prevent illegal immigration after Brexit?
What is the role of 'For' here?
First use of “packing” as in carrying a gun
Can a flute soloist sit?
How did the audience guess the pentatonic scale in Bobby McFerrin's presentation?
Is there a way to generate uniformly distributed points on a sphere from a fixed amount of random real numbers per point?
Can each chord in a progression create its own key?
How to read αἱμύλιος or when to aspirate
Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?
Match Roman Numerals
What would this chord progression be called?
Can the Right Ascension and Argument of Perigee of a spacecraft's orbit keep varying by themselves with time?
One-dimensional Japanese puzzle
how can a perfect fourth interval be considered either consonant or dissonant?
Did the new image of black hole confirm the general theory of relativity?
How do spell lists change if the party levels up without taking a long rest?
Drawing arrows from one table cell reference to another
Install GCC in Git for Windows bash environment
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Trying to install gcc+ in GitMinGW Git Bash observable progress output inconsistency across machinesEditor for 'git bash' on Windows (editor for mingw/msys+mintty)?Trying to get git's core.pager to work on both mingw and cygwinUnable to rsync to another volume with Git BashAs a ssh client, putty works but git bash doesn't workCan't get msys2 to open windows home directory on startupAvoid adding unnecessay Windows %PATH% to Git BashConEmu: How to call msys2 Portable as tab?MSYS2 and “At least one valid and enabled repository required for this action to succeed.”Windows git “bad file descriptor” while commiting on OES Network Share
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I have Git for Windows installed on a Windows 7 machine (no, sadly I can't switch to W10 on this particular machine). This comes with a bash environment that uses MinGW-64 but only includes some binaries. I'd like to add more, such as GCC.
It seems like there should be someway of adding to the MinGW-64 binaries within the git bash instead of adding a whole other MSYS2/MinGW-64 install. However I'm not exactly clear on what is the best way to go about enabling this. I have tried installing win-builds in the bash install usr/
directory (seemed like the place all the other binaries were). It seems to run OK but it doesn't seem to add anything AFAICT, no executables, no folders, nada... except if I try to run the install again it complains that there are already files there... though they patently aren't.
Thus my question is this: can I use win-builds or some other binary to achieve my aim and if so, how?
Note: There are several questions about this around the net and SE, but most are quite old and so no longer relevant AFAICT due to changes in MSYS2, MinGW and Git for Windows.
windows-7 mingw git-bash msys
add a comment |
I have Git for Windows installed on a Windows 7 machine (no, sadly I can't switch to W10 on this particular machine). This comes with a bash environment that uses MinGW-64 but only includes some binaries. I'd like to add more, such as GCC.
It seems like there should be someway of adding to the MinGW-64 binaries within the git bash instead of adding a whole other MSYS2/MinGW-64 install. However I'm not exactly clear on what is the best way to go about enabling this. I have tried installing win-builds in the bash install usr/
directory (seemed like the place all the other binaries were). It seems to run OK but it doesn't seem to add anything AFAICT, no executables, no folders, nada... except if I try to run the install again it complains that there are already files there... though they patently aren't.
Thus my question is this: can I use win-builds or some other binary to achieve my aim and if so, how?
Note: There are several questions about this around the net and SE, but most are quite old and so no longer relevant AFAICT due to changes in MSYS2, MinGW and Git for Windows.
windows-7 mingw git-bash msys
Ah. I see the following is likely relevant and probably means I should just go install MSYS separately. I'll leave this question open for a while in case someone has alternatives. stackoverflow.com/q/32712133/1292918
– Toby
Feb 12 '18 at 17:43
1
What’s wrong with replacing Git for Windows entirely?
– Daniel B
Feb 14 '18 at 14:37
@DanielB I hadn't considered that TBH. Though I do like to have the GUI there in case something goes drastically wrong. On such occasions I don't like to have to spend time researching arcane command options to get output that is easily visually parsable.
– Toby
Feb 14 '18 at 14:42
1
You can always use a different GUI like SourceTree oder Git Extensions. Git also ships withgitk
, but I don’t know whether that would be available with MSYS.
– Daniel B
Feb 14 '18 at 14:48
add a comment |
I have Git for Windows installed on a Windows 7 machine (no, sadly I can't switch to W10 on this particular machine). This comes with a bash environment that uses MinGW-64 but only includes some binaries. I'd like to add more, such as GCC.
It seems like there should be someway of adding to the MinGW-64 binaries within the git bash instead of adding a whole other MSYS2/MinGW-64 install. However I'm not exactly clear on what is the best way to go about enabling this. I have tried installing win-builds in the bash install usr/
directory (seemed like the place all the other binaries were). It seems to run OK but it doesn't seem to add anything AFAICT, no executables, no folders, nada... except if I try to run the install again it complains that there are already files there... though they patently aren't.
Thus my question is this: can I use win-builds or some other binary to achieve my aim and if so, how?
Note: There are several questions about this around the net and SE, but most are quite old and so no longer relevant AFAICT due to changes in MSYS2, MinGW and Git for Windows.
windows-7 mingw git-bash msys
I have Git for Windows installed on a Windows 7 machine (no, sadly I can't switch to W10 on this particular machine). This comes with a bash environment that uses MinGW-64 but only includes some binaries. I'd like to add more, such as GCC.
It seems like there should be someway of adding to the MinGW-64 binaries within the git bash instead of adding a whole other MSYS2/MinGW-64 install. However I'm not exactly clear on what is the best way to go about enabling this. I have tried installing win-builds in the bash install usr/
directory (seemed like the place all the other binaries were). It seems to run OK but it doesn't seem to add anything AFAICT, no executables, no folders, nada... except if I try to run the install again it complains that there are already files there... though they patently aren't.
Thus my question is this: can I use win-builds or some other binary to achieve my aim and if so, how?
Note: There are several questions about this around the net and SE, but most are quite old and so no longer relevant AFAICT due to changes in MSYS2, MinGW and Git for Windows.
windows-7 mingw git-bash msys
windows-7 mingw git-bash msys
asked Feb 12 '18 at 17:38
TobyToby
313618
313618
Ah. I see the following is likely relevant and probably means I should just go install MSYS separately. I'll leave this question open for a while in case someone has alternatives. stackoverflow.com/q/32712133/1292918
– Toby
Feb 12 '18 at 17:43
1
What’s wrong with replacing Git for Windows entirely?
– Daniel B
Feb 14 '18 at 14:37
@DanielB I hadn't considered that TBH. Though I do like to have the GUI there in case something goes drastically wrong. On such occasions I don't like to have to spend time researching arcane command options to get output that is easily visually parsable.
– Toby
Feb 14 '18 at 14:42
1
You can always use a different GUI like SourceTree oder Git Extensions. Git also ships withgitk
, but I don’t know whether that would be available with MSYS.
– Daniel B
Feb 14 '18 at 14:48
add a comment |
Ah. I see the following is likely relevant and probably means I should just go install MSYS separately. I'll leave this question open for a while in case someone has alternatives. stackoverflow.com/q/32712133/1292918
– Toby
Feb 12 '18 at 17:43
1
What’s wrong with replacing Git for Windows entirely?
– Daniel B
Feb 14 '18 at 14:37
@DanielB I hadn't considered that TBH. Though I do like to have the GUI there in case something goes drastically wrong. On such occasions I don't like to have to spend time researching arcane command options to get output that is easily visually parsable.
– Toby
Feb 14 '18 at 14:42
1
You can always use a different GUI like SourceTree oder Git Extensions. Git also ships withgitk
, but I don’t know whether that would be available with MSYS.
– Daniel B
Feb 14 '18 at 14:48
Ah. I see the following is likely relevant and probably means I should just go install MSYS separately. I'll leave this question open for a while in case someone has alternatives. stackoverflow.com/q/32712133/1292918
– Toby
Feb 12 '18 at 17:43
Ah. I see the following is likely relevant and probably means I should just go install MSYS separately. I'll leave this question open for a while in case someone has alternatives. stackoverflow.com/q/32712133/1292918
– Toby
Feb 12 '18 at 17:43
1
1
What’s wrong with replacing Git for Windows entirely?
– Daniel B
Feb 14 '18 at 14:37
What’s wrong with replacing Git for Windows entirely?
– Daniel B
Feb 14 '18 at 14:37
@DanielB I hadn't considered that TBH. Though I do like to have the GUI there in case something goes drastically wrong. On such occasions I don't like to have to spend time researching arcane command options to get output that is easily visually parsable.
– Toby
Feb 14 '18 at 14:42
@DanielB I hadn't considered that TBH. Though I do like to have the GUI there in case something goes drastically wrong. On such occasions I don't like to have to spend time researching arcane command options to get output that is easily visually parsable.
– Toby
Feb 14 '18 at 14:42
1
1
You can always use a different GUI like SourceTree oder Git Extensions. Git also ships with
gitk
, but I don’t know whether that would be available with MSYS.– Daniel B
Feb 14 '18 at 14:48
You can always use a different GUI like SourceTree oder Git Extensions. Git also ships with
gitk
, but I don’t know whether that would be available with MSYS.– Daniel B
Feb 14 '18 at 14:48
add a comment |
3 Answers
3
active
oldest
votes
USE MINGW-W64
1. Install mingw-w64 (Follow the "Sourceforge" link) and install it to the default Program Files
based path.
2. Select the latest "version" (for GCC), change "architecture" from i686
(32-bit) to x86_64
(64-bit), and change "threads" to win32
.
3. Add the bin
folder to the beginning of your Git BASH (MINGW64) path:
You'll, of course, need to adjust the above path to match the version of your of your particular install:
Alternatively
You may be able to just install it directly into the same folder as Git:
C:Program FilesGit
But I haven't tried this alternative approach and I wouldn't recommend it because it is likely to cause issues when updating and may confuse uninstallers, leaving remnants. (if the two installations don't interfere to begin with)
[ Edit: GNU Make is installed as mingw32-make.exe
. You can make a copy of it, somewhere in your $PATH
which you have permission to, and rename it to make
. Git Bash seems to respect that it's executable, even without an extension, which is handy if you don't want it picked up outside of the MinGW environment (even though it may be in your PATH). ]
This solution worked for me without problems. I'd call this the answer.
– Ian
2 days ago
add a comment |
FWIW I just uninstalled Git for Windows and instead installed both GCC and git within MSYS2, as @DanielB commented.
add a comment |
You have to share Windows' PATH (and probably other) environment variables with MinGW. For MSYS2 you can share them by adding this to your Windows' env. variables:
MSYS2_PATH_TYPE=inherit
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1294343%2finstall-gcc-in-git-for-windows-bash-environment%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
USE MINGW-W64
1. Install mingw-w64 (Follow the "Sourceforge" link) and install it to the default Program Files
based path.
2. Select the latest "version" (for GCC), change "architecture" from i686
(32-bit) to x86_64
(64-bit), and change "threads" to win32
.
3. Add the bin
folder to the beginning of your Git BASH (MINGW64) path:
You'll, of course, need to adjust the above path to match the version of your of your particular install:
Alternatively
You may be able to just install it directly into the same folder as Git:
C:Program FilesGit
But I haven't tried this alternative approach and I wouldn't recommend it because it is likely to cause issues when updating and may confuse uninstallers, leaving remnants. (if the two installations don't interfere to begin with)
[ Edit: GNU Make is installed as mingw32-make.exe
. You can make a copy of it, somewhere in your $PATH
which you have permission to, and rename it to make
. Git Bash seems to respect that it's executable, even without an extension, which is handy if you don't want it picked up outside of the MinGW environment (even though it may be in your PATH). ]
This solution worked for me without problems. I'd call this the answer.
– Ian
2 days ago
add a comment |
USE MINGW-W64
1. Install mingw-w64 (Follow the "Sourceforge" link) and install it to the default Program Files
based path.
2. Select the latest "version" (for GCC), change "architecture" from i686
(32-bit) to x86_64
(64-bit), and change "threads" to win32
.
3. Add the bin
folder to the beginning of your Git BASH (MINGW64) path:
You'll, of course, need to adjust the above path to match the version of your of your particular install:
Alternatively
You may be able to just install it directly into the same folder as Git:
C:Program FilesGit
But I haven't tried this alternative approach and I wouldn't recommend it because it is likely to cause issues when updating and may confuse uninstallers, leaving remnants. (if the two installations don't interfere to begin with)
[ Edit: GNU Make is installed as mingw32-make.exe
. You can make a copy of it, somewhere in your $PATH
which you have permission to, and rename it to make
. Git Bash seems to respect that it's executable, even without an extension, which is handy if you don't want it picked up outside of the MinGW environment (even though it may be in your PATH). ]
This solution worked for me without problems. I'd call this the answer.
– Ian
2 days ago
add a comment |
USE MINGW-W64
1. Install mingw-w64 (Follow the "Sourceforge" link) and install it to the default Program Files
based path.
2. Select the latest "version" (for GCC), change "architecture" from i686
(32-bit) to x86_64
(64-bit), and change "threads" to win32
.
3. Add the bin
folder to the beginning of your Git BASH (MINGW64) path:
You'll, of course, need to adjust the above path to match the version of your of your particular install:
Alternatively
You may be able to just install it directly into the same folder as Git:
C:Program FilesGit
But I haven't tried this alternative approach and I wouldn't recommend it because it is likely to cause issues when updating and may confuse uninstallers, leaving remnants. (if the two installations don't interfere to begin with)
[ Edit: GNU Make is installed as mingw32-make.exe
. You can make a copy of it, somewhere in your $PATH
which you have permission to, and rename it to make
. Git Bash seems to respect that it's executable, even without an extension, which is handy if you don't want it picked up outside of the MinGW environment (even though it may be in your PATH). ]
USE MINGW-W64
1. Install mingw-w64 (Follow the "Sourceforge" link) and install it to the default Program Files
based path.
2. Select the latest "version" (for GCC), change "architecture" from i686
(32-bit) to x86_64
(64-bit), and change "threads" to win32
.
3. Add the bin
folder to the beginning of your Git BASH (MINGW64) path:
You'll, of course, need to adjust the above path to match the version of your of your particular install:
Alternatively
You may be able to just install it directly into the same folder as Git:
C:Program FilesGit
But I haven't tried this alternative approach and I wouldn't recommend it because it is likely to cause issues when updating and may confuse uninstallers, leaving remnants. (if the two installations don't interfere to begin with)
[ Edit: GNU Make is installed as mingw32-make.exe
. You can make a copy of it, somewhere in your $PATH
which you have permission to, and rename it to make
. Git Bash seems to respect that it's executable, even without an extension, which is handy if you don't want it picked up outside of the MinGW environment (even though it may be in your PATH). ]
edited yesterday
answered Aug 21 '18 at 20:23
veganaiZeveganaiZe
1795
1795
This solution worked for me without problems. I'd call this the answer.
– Ian
2 days ago
add a comment |
This solution worked for me without problems. I'd call this the answer.
– Ian
2 days ago
This solution worked for me without problems. I'd call this the answer.
– Ian
2 days ago
This solution worked for me without problems. I'd call this the answer.
– Ian
2 days ago
add a comment |
FWIW I just uninstalled Git for Windows and instead installed both GCC and git within MSYS2, as @DanielB commented.
add a comment |
FWIW I just uninstalled Git for Windows and instead installed both GCC and git within MSYS2, as @DanielB commented.
add a comment |
FWIW I just uninstalled Git for Windows and instead installed both GCC and git within MSYS2, as @DanielB commented.
FWIW I just uninstalled Git for Windows and instead installed both GCC and git within MSYS2, as @DanielB commented.
answered Feb 20 '18 at 15:58
TobyToby
313618
313618
add a comment |
add a comment |
You have to share Windows' PATH (and probably other) environment variables with MinGW. For MSYS2 you can share them by adding this to your Windows' env. variables:
MSYS2_PATH_TYPE=inherit
add a comment |
You have to share Windows' PATH (and probably other) environment variables with MinGW. For MSYS2 you can share them by adding this to your Windows' env. variables:
MSYS2_PATH_TYPE=inherit
add a comment |
You have to share Windows' PATH (and probably other) environment variables with MinGW. For MSYS2 you can share them by adding this to your Windows' env. variables:
MSYS2_PATH_TYPE=inherit
You have to share Windows' PATH (and probably other) environment variables with MinGW. For MSYS2 you can share them by adding this to your Windows' env. variables:
MSYS2_PATH_TYPE=inherit
answered Feb 14 '18 at 12:53
ErayEray
3762616
3762616
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1294343%2finstall-gcc-in-git-for-windows-bash-environment%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Ah. I see the following is likely relevant and probably means I should just go install MSYS separately. I'll leave this question open for a while in case someone has alternatives. stackoverflow.com/q/32712133/1292918
– Toby
Feb 12 '18 at 17:43
1
What’s wrong with replacing Git for Windows entirely?
– Daniel B
Feb 14 '18 at 14:37
@DanielB I hadn't considered that TBH. Though I do like to have the GUI there in case something goes drastically wrong. On such occasions I don't like to have to spend time researching arcane command options to get output that is easily visually parsable.
– Toby
Feb 14 '18 at 14:42
1
You can always use a different GUI like SourceTree oder Git Extensions. Git also ships with
gitk
, but I don’t know whether that would be available with MSYS.– Daniel B
Feb 14 '18 at 14:48