Build C++ program on Windows with CL (VS Build Tool Compiler)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I try to build program from command line with CL.
Run next command:
CL -I"C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023include" C:devprojectsconsole-interaction-testermain.cpp
And I caught error:
C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023includecrtdefs.h(10): fatal error C1083: ...... corecrt.h: No such file or directory
I tried all flags from VS ouptup, like /nologo /TP /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /showIncludes but it doesn't work.
I need sample of command, what can ignore UniversalCRT, or instruction how fix path. I wanted to add includes dir with corecrt.h but classic location C:Program Files (x86)Microsoft SDKsWindows Kits10includes doesn't exists!
c++ cmake msbuild cl
add a comment |
I try to build program from command line with CL.
Run next command:
CL -I"C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023include" C:devprojectsconsole-interaction-testermain.cpp
And I caught error:
C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023includecrtdefs.h(10): fatal error C1083: ...... corecrt.h: No such file or directory
I tried all flags from VS ouptup, like /nologo /TP /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /showIncludes but it doesn't work.
I need sample of command, what can ignore UniversalCRT, or instruction how fix path. I wanted to add includes dir with corecrt.h but classic location C:Program Files (x86)Microsoft SDKsWindows Kits10includes doesn't exists!
c++ cmake msbuild cl
add a comment |
I try to build program from command line with CL.
Run next command:
CL -I"C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023include" C:devprojectsconsole-interaction-testermain.cpp
And I caught error:
C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023includecrtdefs.h(10): fatal error C1083: ...... corecrt.h: No such file or directory
I tried all flags from VS ouptup, like /nologo /TP /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /showIncludes but it doesn't work.
I need sample of command, what can ignore UniversalCRT, or instruction how fix path. I wanted to add includes dir with corecrt.h but classic location C:Program Files (x86)Microsoft SDKsWindows Kits10includes doesn't exists!
c++ cmake msbuild cl
I try to build program from command line with CL.
Run next command:
CL -I"C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023include" C:devprojectsconsole-interaction-testermain.cpp
And I caught error:
C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.16.27023includecrtdefs.h(10): fatal error C1083: ...... corecrt.h: No such file or directory
I tried all flags from VS ouptup, like /nologo /TP /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /showIncludes but it doesn't work.
I need sample of command, what can ignore UniversalCRT, or instruction how fix path. I wanted to add includes dir with corecrt.h but classic location C:Program Files (x86)Microsoft SDKsWindows Kits10includes doesn't exists!
c++ cmake msbuild cl
c++ cmake msbuild cl
edited Nov 16 '18 at 7:46
Alex
656411
656411
asked Nov 15 '18 at 10:49
GFBGFB
121210
121210
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Install Windows SDK.
Run the VS2017 installer again, and select it (or plainly select the full C++ dev package).
Is this only way? Have I install 16 Gb of sowf to compile little C++ program?
– GFB
Nov 15 '18 at 13:10
If smb interested, I installed another components for C++ dev and write bat file for build. Solution here: github.com/goforbroke1006/console-interaction-tester/blob/…
– GFB
Nov 15 '18 at 13:12
Yes, it's the only way. You don't have to have the full package, then you have to go an look for the Windows SDK inside the individual models.
– Matthieu Brucher
Nov 15 '18 at 13:24
add a comment |
Your Answer
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%2f53317744%2fbuild-c-program-on-windows-with-cl-vs-build-tool-compiler%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
Install Windows SDK.
Run the VS2017 installer again, and select it (or plainly select the full C++ dev package).
Is this only way? Have I install 16 Gb of sowf to compile little C++ program?
– GFB
Nov 15 '18 at 13:10
If smb interested, I installed another components for C++ dev and write bat file for build. Solution here: github.com/goforbroke1006/console-interaction-tester/blob/…
– GFB
Nov 15 '18 at 13:12
Yes, it's the only way. You don't have to have the full package, then you have to go an look for the Windows SDK inside the individual models.
– Matthieu Brucher
Nov 15 '18 at 13:24
add a comment |
Install Windows SDK.
Run the VS2017 installer again, and select it (or plainly select the full C++ dev package).
Is this only way? Have I install 16 Gb of sowf to compile little C++ program?
– GFB
Nov 15 '18 at 13:10
If smb interested, I installed another components for C++ dev and write bat file for build. Solution here: github.com/goforbroke1006/console-interaction-tester/blob/…
– GFB
Nov 15 '18 at 13:12
Yes, it's the only way. You don't have to have the full package, then you have to go an look for the Windows SDK inside the individual models.
– Matthieu Brucher
Nov 15 '18 at 13:24
add a comment |
Install Windows SDK.
Run the VS2017 installer again, and select it (or plainly select the full C++ dev package).
Install Windows SDK.
Run the VS2017 installer again, and select it (or plainly select the full C++ dev package).
answered Nov 15 '18 at 10:58
Matthieu BrucherMatthieu Brucher
17.7k52445
17.7k52445
Is this only way? Have I install 16 Gb of sowf to compile little C++ program?
– GFB
Nov 15 '18 at 13:10
If smb interested, I installed another components for C++ dev and write bat file for build. Solution here: github.com/goforbroke1006/console-interaction-tester/blob/…
– GFB
Nov 15 '18 at 13:12
Yes, it's the only way. You don't have to have the full package, then you have to go an look for the Windows SDK inside the individual models.
– Matthieu Brucher
Nov 15 '18 at 13:24
add a comment |
Is this only way? Have I install 16 Gb of sowf to compile little C++ program?
– GFB
Nov 15 '18 at 13:10
If smb interested, I installed another components for C++ dev and write bat file for build. Solution here: github.com/goforbroke1006/console-interaction-tester/blob/…
– GFB
Nov 15 '18 at 13:12
Yes, it's the only way. You don't have to have the full package, then you have to go an look for the Windows SDK inside the individual models.
– Matthieu Brucher
Nov 15 '18 at 13:24
Is this only way? Have I install 16 Gb of sowf to compile little C++ program?
– GFB
Nov 15 '18 at 13:10
Is this only way? Have I install 16 Gb of sowf to compile little C++ program?
– GFB
Nov 15 '18 at 13:10
If smb interested, I installed another components for C++ dev and write bat file for build. Solution here: github.com/goforbroke1006/console-interaction-tester/blob/…
– GFB
Nov 15 '18 at 13:12
If smb interested, I installed another components for C++ dev and write bat file for build. Solution here: github.com/goforbroke1006/console-interaction-tester/blob/…
– GFB
Nov 15 '18 at 13:12
Yes, it's the only way. You don't have to have the full package, then you have to go an look for the Windows SDK inside the individual models.
– Matthieu Brucher
Nov 15 '18 at 13:24
Yes, it's the only way. You don't have to have the full package, then you have to go an look for the Windows SDK inside the individual models.
– Matthieu Brucher
Nov 15 '18 at 13:24
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%2f53317744%2fbuild-c-program-on-windows-with-cl-vs-build-tool-compiler%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