C:Program was unexpected at this time. Trying to compile C++ library to .dll via .bat file from Visual Studio...
up vote
0
down vote
favorite
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
up vote
0
down vote
favorite
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 at 15:25
2
Use the x64 command line directly.
– Matthieu Brucher
Nov 19 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 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 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 at 15:55
|
show 3 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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 at 15:25
Matthieu Brucher
9,62521834
9,62521834
asked Nov 19 at 15:22
PetrasVestartasEPFL
1
1
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 at 15:25
2
Use the x64 command line directly.
– Matthieu Brucher
Nov 19 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 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 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 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 at 15:25
2
Use the x64 command line directly.
– Matthieu Brucher
Nov 19 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 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 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 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 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 at 15:25
2
2
Use the x64 command line directly.
– Matthieu Brucher
Nov 19 at 15:26
Use the x64 command line directly.
– Matthieu Brucher
Nov 19 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 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 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 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 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 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 at 15:55
|
show 3 more comments
active
oldest
votes
active
oldest
votes
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 at 15:25
2
Use the x64 command line directly.
– Matthieu Brucher
Nov 19 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 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 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 at 15:55