Not able to run C++ code on Windows 8.1 Pro
I have installed the g++ compiler on my PC at my work place, downloaded from https://osdn.net/projects/mingw/releases/ here. I've also set the system path variable, but when I try to compile my code in command prompt, it shows the message that g++ is not recognized as an internal command.
I have Windows 10 on my home PC and I followed the exact process to install g++ and my code runs smoothly there, but I'm facing this issue on my working PC. Any help would be appreciated. Thank you.
windows-8 cmd.exe c++ g++
|
show 3 more comments
I have installed the g++ compiler on my PC at my work place, downloaded from https://osdn.net/projects/mingw/releases/ here. I've also set the system path variable, but when I try to compile my code in command prompt, it shows the message that g++ is not recognized as an internal command.
I have Windows 10 on my home PC and I followed the exact process to install g++ and my code runs smoothly there, but I'm facing this issue on my working PC. Any help would be appreciated. Thank you.
windows-8 cmd.exe c++ g++
2
What directory has g++ been installed to? Have you tried running the command line from that directory? I know you said you updated your path but I've had similar issues that was solved this way.
– Jon
Jan 29 at 4:35
1
I have installed g++ to C:MinGWbin, and I just noticed that if I paste my code file there and then through cmd access the bin folder and try to compile the code, it does perfectly.
– Shashank Kadambri
Jan 29 at 7:49
Did you close and re-open your IDE or DOS box? In Window's, it won't pick up the new path until you re-launch it. Such things are assigned at process start & globally changing them afterwards does not affect currently running processes.
– Mawg
Jan 29 at 8:03
1
@Mawg I tried restarting my PC, but it didn't help.
– Shashank Kadambri
Jan 29 at 8:13
I guess that compiling from the command line is tying to keep things simple in order to test. But, since you intend to use an IDE anyway (you do, don't you?), why not start that as most let you specify where the build tools are. OR - must it be g++? If you install MS Visual Studio, that should sort of the paths for you. Can you tell us what oyu intend to develop? Command line .exe? Windows GUI programs? Something else?
– Mawg
Jan 29 at 8:18
|
show 3 more comments
I have installed the g++ compiler on my PC at my work place, downloaded from https://osdn.net/projects/mingw/releases/ here. I've also set the system path variable, but when I try to compile my code in command prompt, it shows the message that g++ is not recognized as an internal command.
I have Windows 10 on my home PC and I followed the exact process to install g++ and my code runs smoothly there, but I'm facing this issue on my working PC. Any help would be appreciated. Thank you.
windows-8 cmd.exe c++ g++
I have installed the g++ compiler on my PC at my work place, downloaded from https://osdn.net/projects/mingw/releases/ here. I've also set the system path variable, but when I try to compile my code in command prompt, it shows the message that g++ is not recognized as an internal command.
I have Windows 10 on my home PC and I followed the exact process to install g++ and my code runs smoothly there, but I'm facing this issue on my working PC. Any help would be appreciated. Thank you.
windows-8 cmd.exe c++ g++
windows-8 cmd.exe c++ g++
asked Jan 29 at 4:32
Shashank KadambriShashank Kadambri
61
61
2
What directory has g++ been installed to? Have you tried running the command line from that directory? I know you said you updated your path but I've had similar issues that was solved this way.
– Jon
Jan 29 at 4:35
1
I have installed g++ to C:MinGWbin, and I just noticed that if I paste my code file there and then through cmd access the bin folder and try to compile the code, it does perfectly.
– Shashank Kadambri
Jan 29 at 7:49
Did you close and re-open your IDE or DOS box? In Window's, it won't pick up the new path until you re-launch it. Such things are assigned at process start & globally changing them afterwards does not affect currently running processes.
– Mawg
Jan 29 at 8:03
1
@Mawg I tried restarting my PC, but it didn't help.
– Shashank Kadambri
Jan 29 at 8:13
I guess that compiling from the command line is tying to keep things simple in order to test. But, since you intend to use an IDE anyway (you do, don't you?), why not start that as most let you specify where the build tools are. OR - must it be g++? If you install MS Visual Studio, that should sort of the paths for you. Can you tell us what oyu intend to develop? Command line .exe? Windows GUI programs? Something else?
– Mawg
Jan 29 at 8:18
|
show 3 more comments
2
What directory has g++ been installed to? Have you tried running the command line from that directory? I know you said you updated your path but I've had similar issues that was solved this way.
– Jon
Jan 29 at 4:35
1
I have installed g++ to C:MinGWbin, and I just noticed that if I paste my code file there and then through cmd access the bin folder and try to compile the code, it does perfectly.
– Shashank Kadambri
Jan 29 at 7:49
Did you close and re-open your IDE or DOS box? In Window's, it won't pick up the new path until you re-launch it. Such things are assigned at process start & globally changing them afterwards does not affect currently running processes.
– Mawg
Jan 29 at 8:03
1
@Mawg I tried restarting my PC, but it didn't help.
– Shashank Kadambri
Jan 29 at 8:13
I guess that compiling from the command line is tying to keep things simple in order to test. But, since you intend to use an IDE anyway (you do, don't you?), why not start that as most let you specify where the build tools are. OR - must it be g++? If you install MS Visual Studio, that should sort of the paths for you. Can you tell us what oyu intend to develop? Command line .exe? Windows GUI programs? Something else?
– Mawg
Jan 29 at 8:18
2
2
What directory has g++ been installed to? Have you tried running the command line from that directory? I know you said you updated your path but I've had similar issues that was solved this way.
– Jon
Jan 29 at 4:35
What directory has g++ been installed to? Have you tried running the command line from that directory? I know you said you updated your path but I've had similar issues that was solved this way.
– Jon
Jan 29 at 4:35
1
1
I have installed g++ to C:MinGWbin, and I just noticed that if I paste my code file there and then through cmd access the bin folder and try to compile the code, it does perfectly.
– Shashank Kadambri
Jan 29 at 7:49
I have installed g++ to C:MinGWbin, and I just noticed that if I paste my code file there and then through cmd access the bin folder and try to compile the code, it does perfectly.
– Shashank Kadambri
Jan 29 at 7:49
Did you close and re-open your IDE or DOS box? In Window's, it won't pick up the new path until you re-launch it. Such things are assigned at process start & globally changing them afterwards does not affect currently running processes.
– Mawg
Jan 29 at 8:03
Did you close and re-open your IDE or DOS box? In Window's, it won't pick up the new path until you re-launch it. Such things are assigned at process start & globally changing them afterwards does not affect currently running processes.
– Mawg
Jan 29 at 8:03
1
1
@Mawg I tried restarting my PC, but it didn't help.
– Shashank Kadambri
Jan 29 at 8:13
@Mawg I tried restarting my PC, but it didn't help.
– Shashank Kadambri
Jan 29 at 8:13
I guess that compiling from the command line is tying to keep things simple in order to test. But, since you intend to use an IDE anyway (you do, don't you?), why not start that as most let you specify where the build tools are. OR - must it be g++? If you install MS Visual Studio, that should sort of the paths for you. Can you tell us what oyu intend to develop? Command line .exe? Windows GUI programs? Something else?
– Mawg
Jan 29 at 8:18
I guess that compiling from the command line is tying to keep things simple in order to test. But, since you intend to use an IDE anyway (you do, don't you?), why not start that as most let you specify where the build tools are. OR - must it be g++? If you install MS Visual Studio, that should sort of the paths for you. Can you tell us what oyu intend to develop? Command line .exe? Windows GUI programs? Something else?
– Mawg
Jan 29 at 8:18
|
show 3 more comments
0
active
oldest
votes
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%2f1399500%2fnot-able-to-run-c-code-on-windows-8-1-pro%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f1399500%2fnot-able-to-run-c-code-on-windows-8-1-pro%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
2
What directory has g++ been installed to? Have you tried running the command line from that directory? I know you said you updated your path but I've had similar issues that was solved this way.
– Jon
Jan 29 at 4:35
1
I have installed g++ to C:MinGWbin, and I just noticed that if I paste my code file there and then through cmd access the bin folder and try to compile the code, it does perfectly.
– Shashank Kadambri
Jan 29 at 7:49
Did you close and re-open your IDE or DOS box? In Window's, it won't pick up the new path until you re-launch it. Such things are assigned at process start & globally changing them afterwards does not affect currently running processes.
– Mawg
Jan 29 at 8:03
1
@Mawg I tried restarting my PC, but it didn't help.
– Shashank Kadambri
Jan 29 at 8:13
I guess that compiling from the command line is tying to keep things simple in order to test. But, since you intend to use an IDE anyway (you do, don't you?), why not start that as most let you specify where the build tools are. OR - must it be g++? If you install MS Visual Studio, that should sort of the paths for you. Can you tell us what oyu intend to develop? Command line .exe? Windows GUI programs? Something else?
– Mawg
Jan 29 at 8:18