How to Change C++ standards in VS 2017?
I want to test a Visual studio project for C++ 03 standards.
I have Visual Studio 2017 Community edition and my C++ console application compiles fine.
What settings should I change in Visual studio 2017 so that the C++ compiler doesn't use the latest C++ versions but say "switches to" the C++ 03 standards ?
(What I aiming is, later as a Proof of Concept, I need to copy this source files into a Linux box 'makefile project'. The linux box doesn't conform to C++11 standards. So I need to test the working)
c++
add a comment |
I want to test a Visual studio project for C++ 03 standards.
I have Visual Studio 2017 Community edition and my C++ console application compiles fine.
What settings should I change in Visual studio 2017 so that the C++ compiler doesn't use the latest C++ versions but say "switches to" the C++ 03 standards ?
(What I aiming is, later as a Proof of Concept, I need to copy this source files into a Linux box 'makefile project'. The linux box doesn't conform to C++11 standards. So I need to test the working)
c++
2
Related/duoe: stackoverflow.com/questions/47043869/…
– NathanOliver
Nov 22 '18 at 3:29
What version of GCC/Clang are you stick with so you don't have C++11 or higher? I wouldn't downgrade visual studio, I'd rather invest time to upgrade your Linux compilers
– JVApen
Nov 22 '18 at 9:00
That's a decision my organization has to make. I am new to linux but had been a VS programmer all along.
– Confused Programmer
Nov 23 '18 at 3:18
add a comment |
I want to test a Visual studio project for C++ 03 standards.
I have Visual Studio 2017 Community edition and my C++ console application compiles fine.
What settings should I change in Visual studio 2017 so that the C++ compiler doesn't use the latest C++ versions but say "switches to" the C++ 03 standards ?
(What I aiming is, later as a Proof of Concept, I need to copy this source files into a Linux box 'makefile project'. The linux box doesn't conform to C++11 standards. So I need to test the working)
c++
I want to test a Visual studio project for C++ 03 standards.
I have Visual Studio 2017 Community edition and my C++ console application compiles fine.
What settings should I change in Visual studio 2017 so that the C++ compiler doesn't use the latest C++ versions but say "switches to" the C++ 03 standards ?
(What I aiming is, later as a Proof of Concept, I need to copy this source files into a Linux box 'makefile project'. The linux box doesn't conform to C++11 standards. So I need to test the working)
c++
c++
asked Nov 22 '18 at 3:22
Confused ProgrammerConfused Programmer
314
314
2
Related/duoe: stackoverflow.com/questions/47043869/…
– NathanOliver
Nov 22 '18 at 3:29
What version of GCC/Clang are you stick with so you don't have C++11 or higher? I wouldn't downgrade visual studio, I'd rather invest time to upgrade your Linux compilers
– JVApen
Nov 22 '18 at 9:00
That's a decision my organization has to make. I am new to linux but had been a VS programmer all along.
– Confused Programmer
Nov 23 '18 at 3:18
add a comment |
2
Related/duoe: stackoverflow.com/questions/47043869/…
– NathanOliver
Nov 22 '18 at 3:29
What version of GCC/Clang are you stick with so you don't have C++11 or higher? I wouldn't downgrade visual studio, I'd rather invest time to upgrade your Linux compilers
– JVApen
Nov 22 '18 at 9:00
That's a decision my organization has to make. I am new to linux but had been a VS programmer all along.
– Confused Programmer
Nov 23 '18 at 3:18
2
2
Related/duoe: stackoverflow.com/questions/47043869/…
– NathanOliver
Nov 22 '18 at 3:29
Related/duoe: stackoverflow.com/questions/47043869/…
– NathanOliver
Nov 22 '18 at 3:29
What version of GCC/Clang are you stick with so you don't have C++11 or higher? I wouldn't downgrade visual studio, I'd rather invest time to upgrade your Linux compilers
– JVApen
Nov 22 '18 at 9:00
What version of GCC/Clang are you stick with so you don't have C++11 or higher? I wouldn't downgrade visual studio, I'd rather invest time to upgrade your Linux compilers
– JVApen
Nov 22 '18 at 9:00
That's a decision my organization has to make. I am new to linux but had been a VS programmer all along.
– Confused Programmer
Nov 23 '18 at 3:18
That's a decision my organization has to make. I am new to linux but had been a VS programmer all along.
– Confused Programmer
Nov 23 '18 at 3:18
add a comment |
1 Answer
1
active
oldest
votes
Visual Studio doesn't support this. Your options are C++latest, C++17, and C++14. C++17 mode is fairly well conforming, and C++14 mode is close.
Further reading on docs.microsoft.com: /std (Specify Language Standard Version)
Yes I am aware of the /set option. It enables the settings. I didn't see an option to disable. Guess there is no such feature in VS. Thanks for the response.
– Confused Programmer
Nov 23 '18 at 3:25
/std:c++latest disables conformance. But this means turning everything on (including features that won't be available until C++20). If you're looking to validate that code built on Windows will also build on Linux, you might consider Clang for Windows. Its -std=C++98 option isn't perfect but should reduce the chance of cross-compiler issues. There's also mingw.
– Peter Ruderman
Nov 23 '18 at 5:09
add a comment |
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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%2fstackoverflow.com%2fquestions%2f53423413%2fhow-to-change-c-standards-in-vs-2017%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Visual Studio doesn't support this. Your options are C++latest, C++17, and C++14. C++17 mode is fairly well conforming, and C++14 mode is close.
Further reading on docs.microsoft.com: /std (Specify Language Standard Version)
Yes I am aware of the /set option. It enables the settings. I didn't see an option to disable. Guess there is no such feature in VS. Thanks for the response.
– Confused Programmer
Nov 23 '18 at 3:25
/std:c++latest disables conformance. But this means turning everything on (including features that won't be available until C++20). If you're looking to validate that code built on Windows will also build on Linux, you might consider Clang for Windows. Its -std=C++98 option isn't perfect but should reduce the chance of cross-compiler issues. There's also mingw.
– Peter Ruderman
Nov 23 '18 at 5:09
add a comment |
Visual Studio doesn't support this. Your options are C++latest, C++17, and C++14. C++17 mode is fairly well conforming, and C++14 mode is close.
Further reading on docs.microsoft.com: /std (Specify Language Standard Version)
Yes I am aware of the /set option. It enables the settings. I didn't see an option to disable. Guess there is no such feature in VS. Thanks for the response.
– Confused Programmer
Nov 23 '18 at 3:25
/std:c++latest disables conformance. But this means turning everything on (including features that won't be available until C++20). If you're looking to validate that code built on Windows will also build on Linux, you might consider Clang for Windows. Its -std=C++98 option isn't perfect but should reduce the chance of cross-compiler issues. There's also mingw.
– Peter Ruderman
Nov 23 '18 at 5:09
add a comment |
Visual Studio doesn't support this. Your options are C++latest, C++17, and C++14. C++17 mode is fairly well conforming, and C++14 mode is close.
Further reading on docs.microsoft.com: /std (Specify Language Standard Version)
Visual Studio doesn't support this. Your options are C++latest, C++17, and C++14. C++17 mode is fairly well conforming, and C++14 mode is close.
Further reading on docs.microsoft.com: /std (Specify Language Standard Version)
answered Nov 22 '18 at 4:48
Peter RudermanPeter Ruderman
10.2k2352
10.2k2352
Yes I am aware of the /set option. It enables the settings. I didn't see an option to disable. Guess there is no such feature in VS. Thanks for the response.
– Confused Programmer
Nov 23 '18 at 3:25
/std:c++latest disables conformance. But this means turning everything on (including features that won't be available until C++20). If you're looking to validate that code built on Windows will also build on Linux, you might consider Clang for Windows. Its -std=C++98 option isn't perfect but should reduce the chance of cross-compiler issues. There's also mingw.
– Peter Ruderman
Nov 23 '18 at 5:09
add a comment |
Yes I am aware of the /set option. It enables the settings. I didn't see an option to disable. Guess there is no such feature in VS. Thanks for the response.
– Confused Programmer
Nov 23 '18 at 3:25
/std:c++latest disables conformance. But this means turning everything on (including features that won't be available until C++20). If you're looking to validate that code built on Windows will also build on Linux, you might consider Clang for Windows. Its -std=C++98 option isn't perfect but should reduce the chance of cross-compiler issues. There's also mingw.
– Peter Ruderman
Nov 23 '18 at 5:09
Yes I am aware of the /set option. It enables the settings. I didn't see an option to disable. Guess there is no such feature in VS. Thanks for the response.
– Confused Programmer
Nov 23 '18 at 3:25
Yes I am aware of the /set option. It enables the settings. I didn't see an option to disable. Guess there is no such feature in VS. Thanks for the response.
– Confused Programmer
Nov 23 '18 at 3:25
/std:c++latest disables conformance. But this means turning everything on (including features that won't be available until C++20). If you're looking to validate that code built on Windows will also build on Linux, you might consider Clang for Windows. Its -std=C++98 option isn't perfect but should reduce the chance of cross-compiler issues. There's also mingw.
– Peter Ruderman
Nov 23 '18 at 5:09
/std:c++latest disables conformance. But this means turning everything on (including features that won't be available until C++20). If you're looking to validate that code built on Windows will also build on Linux, you might consider Clang for Windows. Its -std=C++98 option isn't perfect but should reduce the chance of cross-compiler issues. There's also mingw.
– Peter Ruderman
Nov 23 '18 at 5:09
add a comment |
Thanks for contributing an answer to Stack Overflow!
- 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%2fstackoverflow.com%2fquestions%2f53423413%2fhow-to-change-c-standards-in-vs-2017%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
Related/duoe: stackoverflow.com/questions/47043869/…
– NathanOliver
Nov 22 '18 at 3:29
What version of GCC/Clang are you stick with so you don't have C++11 or higher? I wouldn't downgrade visual studio, I'd rather invest time to upgrade your Linux compilers
– JVApen
Nov 22 '18 at 9:00
That's a decision my organization has to make. I am new to linux but had been a VS programmer all along.
– Confused Programmer
Nov 23 '18 at 3:18