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:




  1. I am trying to compile minkowski.cc code of boost library via bat file like this: Screenshot1

  2. Compiling works fine and I can compile and run 32 bit version.

  3. 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: Screenshot2

  4. To change compiler from 32bit to 64 bit I type: vcvarsall.bat x86_amd64

  5. However I get error: C:Program was unexpected at this time.
    Screenshot3


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.










share|improve this question




















  • 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















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:




  1. I am trying to compile minkowski.cc code of boost library via bat file like this: Screenshot1

  2. Compiling works fine and I can compile and run 32 bit version.

  3. 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: Screenshot2

  4. To change compiler from 32bit to 64 bit I type: vcvarsall.bat x86_amd64

  5. However I get error: C:Program was unexpected at this time.
    Screenshot3


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.










share|improve this question




















  • 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













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:




  1. I am trying to compile minkowski.cc code of boost library via bat file like this: Screenshot1

  2. Compiling works fine and I can compile and run 32 bit version.

  3. 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: Screenshot2

  4. To change compiler from 32bit to 64 bit I type: vcvarsall.bat x86_amd64

  5. However I get error: C:Program was unexpected at this time.
    Screenshot3


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.










share|improve this question















This question is not connected with specific library but I will try to explain full process what is the issue:




  1. I am trying to compile minkowski.cc code of boost library via bat file like this: Screenshot1

  2. Compiling works fine and I can compile and run 32 bit version.

  3. 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: Screenshot2

  4. To change compiler from 32bit to 64 bit I type: vcvarsall.bat x86_amd64

  5. However I get error: C:Program was unexpected at this time.
    Screenshot3


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++






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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














  • 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

















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',
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
});


}
});














draft saved

draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Costa Masnaga

Fotorealismo

Sidney Franklin