C:Program was unexpected at this time. Trying to compile C++ library to .dll via .bat file from Visual Studio...
This question is not connected with specific library but I will try to explain full process what is the issue:
- I am trying to compile minkowski.cc code of boost library via bat file like this:
- Compiling works fine and I can compile and run 32 bit version.
- The problem happens when I want to compile 64 bit version. Again it is not the issue of library but compiling issue. To compile I open "Visual Studio Community 2017 Command Prompt" (I have C++ development installed), by default compiler is set to x86 - 32 bit version:
- To change compiler from 32bit to 64 bit I type: vcvarsall.bat x86_amd64
- However I get error: C:Program was unexpected at this time.
I am searching how to change compiler from 32 bit to 64 bit for a week in stack-overflow and google queries but cannot find a correct answer. Please help.
c++
|
show 3 more comments
This question is not connected with specific library but I will try to explain full process what is the issue:
- I am trying to compile minkowski.cc code of boost library via bat file like this:
- Compiling works fine and I can compile and run 32 bit version.
- The problem happens when I want to compile 64 bit version. Again it is not the issue of library but compiling issue. To compile I open "Visual Studio Community 2017 Command Prompt" (I have C++ development installed), by default compiler is set to x86 - 32 bit version:
- To change compiler from 32bit to 64 bit I type: vcvarsall.bat x86_amd64
- However I get error: C:Program was unexpected at this time.
I am searching how to change compiler from 32 bit to 64 bit for a week in stack-overflow and google queries but cannot find a correct answer. Please help.
c++
5
If it only parses C:Program it means most likely that you need to provide the full path inside quotes" "
So it doesn't take spaces as separators between parameters
– Sembei Norimaki
Nov 19 '18 at 15:25
2
Use the x64 command line directly.
– Matthieu Brucher
Nov 19 '18 at 15:26
You already started the developer command prompt. Starting it again is not a good idea. Do favor the IDE to get past basic speed-bumps like this.
– Hans Passant
Nov 19 '18 at 15:28
1
@PetrasVestartasEPFL There are 2 types of paths: relative path, or full path. Regardless of which one you use, if such path contains spaces - it must be inside quotes.
– Algirdas Preidžius
Nov 19 '18 at 15:50
1
The comments you got are not helpful, it is a command inside vcvarsall.bat that caused this problem. You must not run it twice. If you need to target a different architecture then pick the right shortcut in the Start menu. You want Visual Studio 2017 > x64 Native Tools Command Prompt for VS2017.
– Hans Passant
Nov 19 '18 at 15:55
|
show 3 more comments
This question is not connected with specific library but I will try to explain full process what is the issue:
- I am trying to compile minkowski.cc code of boost library via bat file like this:
- Compiling works fine and I can compile and run 32 bit version.
- The problem happens when I want to compile 64 bit version. Again it is not the issue of library but compiling issue. To compile I open "Visual Studio Community 2017 Command Prompt" (I have C++ development installed), by default compiler is set to x86 - 32 bit version:
- To change compiler from 32bit to 64 bit I type: vcvarsall.bat x86_amd64
- However I get error: C:Program was unexpected at this time.
I am searching how to change compiler from 32 bit to 64 bit for a week in stack-overflow and google queries but cannot find a correct answer. Please help.
c++
This question is not connected with specific library but I will try to explain full process what is the issue:
- I am trying to compile minkowski.cc code of boost library via bat file like this:
- Compiling works fine and I can compile and run 32 bit version.
- The problem happens when I want to compile 64 bit version. Again it is not the issue of library but compiling issue. To compile I open "Visual Studio Community 2017 Command Prompt" (I have C++ development installed), by default compiler is set to x86 - 32 bit version:
- To change compiler from 32bit to 64 bit I type: vcvarsall.bat x86_amd64
- However I get error: C:Program was unexpected at this time.
I am searching how to change compiler from 32 bit to 64 bit for a week in stack-overflow and google queries but cannot find a correct answer. Please help.
c++
c++
edited Nov 19 '18 at 15:25
Matthieu Brucher
12.4k22140
12.4k22140
asked Nov 19 '18 at 15:22


PetrasVestartasEPFL
262
262
5
If it only parses C:Program it means most likely that you need to provide the full path inside quotes" "
So it doesn't take spaces as separators between parameters
– Sembei Norimaki
Nov 19 '18 at 15:25
2
Use the x64 command line directly.
– Matthieu Brucher
Nov 19 '18 at 15:26
You already started the developer command prompt. Starting it again is not a good idea. Do favor the IDE to get past basic speed-bumps like this.
– Hans Passant
Nov 19 '18 at 15:28
1
@PetrasVestartasEPFL There are 2 types of paths: relative path, or full path. Regardless of which one you use, if such path contains spaces - it must be inside quotes.
– Algirdas Preidžius
Nov 19 '18 at 15:50
1
The comments you got are not helpful, it is a command inside vcvarsall.bat that caused this problem. You must not run it twice. If you need to target a different architecture then pick the right shortcut in the Start menu. You want Visual Studio 2017 > x64 Native Tools Command Prompt for VS2017.
– Hans Passant
Nov 19 '18 at 15:55
|
show 3 more comments
5
If it only parses C:Program it means most likely that you need to provide the full path inside quotes" "
So it doesn't take spaces as separators between parameters
– Sembei Norimaki
Nov 19 '18 at 15:25
2
Use the x64 command line directly.
– Matthieu Brucher
Nov 19 '18 at 15:26
You already started the developer command prompt. Starting it again is not a good idea. Do favor the IDE to get past basic speed-bumps like this.
– Hans Passant
Nov 19 '18 at 15:28
1
@PetrasVestartasEPFL There are 2 types of paths: relative path, or full path. Regardless of which one you use, if such path contains spaces - it must be inside quotes.
– Algirdas Preidžius
Nov 19 '18 at 15:50
1
The comments you got are not helpful, it is a command inside vcvarsall.bat that caused this problem. You must not run it twice. If you need to target a different architecture then pick the right shortcut in the Start menu. You want Visual Studio 2017 > x64 Native Tools Command Prompt for VS2017.
– Hans Passant
Nov 19 '18 at 15:55
5
5
If it only parses C:Program it means most likely that you need to provide the full path inside quotes
" "
So it doesn't take spaces as separators between parameters– Sembei Norimaki
Nov 19 '18 at 15:25
If it only parses C:Program it means most likely that you need to provide the full path inside quotes
" "
So it doesn't take spaces as separators between parameters– Sembei Norimaki
Nov 19 '18 at 15:25
2
2
Use the x64 command line directly.
– Matthieu Brucher
Nov 19 '18 at 15:26
Use the x64 command line directly.
– Matthieu Brucher
Nov 19 '18 at 15:26
You already started the developer command prompt. Starting it again is not a good idea. Do favor the IDE to get past basic speed-bumps like this.
– Hans Passant
Nov 19 '18 at 15:28
You already started the developer command prompt. Starting it again is not a good idea. Do favor the IDE to get past basic speed-bumps like this.
– Hans Passant
Nov 19 '18 at 15:28
1
1
@PetrasVestartasEPFL There are 2 types of paths: relative path, or full path. Regardless of which one you use, if such path contains spaces - it must be inside quotes.
– Algirdas Preidžius
Nov 19 '18 at 15:50
@PetrasVestartasEPFL There are 2 types of paths: relative path, or full path. Regardless of which one you use, if such path contains spaces - it must be inside quotes.
– Algirdas Preidžius
Nov 19 '18 at 15:50
1
1
The comments you got are not helpful, it is a command inside vcvarsall.bat that caused this problem. You must not run it twice. If you need to target a different architecture then pick the right shortcut in the Start menu. You want Visual Studio 2017 > x64 Native Tools Command Prompt for VS2017.
– Hans Passant
Nov 19 '18 at 15:55
The comments you got are not helpful, it is a command inside vcvarsall.bat that caused this problem. You must not run it twice. If you need to target a different architecture then pick the right shortcut in the Start menu. You want Visual Studio 2017 > x64 Native Tools Command Prompt for VS2017.
– Hans Passant
Nov 19 '18 at 15:55
|
show 3 more comments
0
active
oldest
votes
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%2f53377728%2fc-program-was-unexpected-at-this-time-trying-to-compile-c-library-to-dll-vi%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 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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f53377728%2fc-program-was-unexpected-at-this-time-trying-to-compile-c-library-to-dll-vi%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
5
If it only parses C:Program it means most likely that you need to provide the full path inside quotes
" "
So it doesn't take spaces as separators between parameters– Sembei Norimaki
Nov 19 '18 at 15:25
2
Use the x64 command line directly.
– Matthieu Brucher
Nov 19 '18 at 15:26
You already started the developer command prompt. Starting it again is not a good idea. Do favor the IDE to get past basic speed-bumps like this.
– Hans Passant
Nov 19 '18 at 15:28
1
@PetrasVestartasEPFL There are 2 types of paths: relative path, or full path. Regardless of which one you use, if such path contains spaces - it must be inside quotes.
– Algirdas Preidžius
Nov 19 '18 at 15:50
1
The comments you got are not helpful, it is a command inside vcvarsall.bat that caused this problem. You must not run it twice. If you need to target a different architecture then pick the right shortcut in the Start menu. You want Visual Studio 2017 > x64 Native Tools Command Prompt for VS2017.
– Hans Passant
Nov 19 '18 at 15:55