I try to compile this library: https://github.com/nitroshare/qhttpengine on Windows for Qt. I do everything as written in the Readme - I run cmake -G "NMake Makefiles" .. and get a bunch of fatal errors: The C compiler "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe" is not able to compile a simple test program.

Next come the nmake error - NMAKE: fatal error u1077 finished with code "0xffffff" and "0x2" .

The path to the bin folder visual studio registered in Path, cmake is also registered in Path. What can be wrong? All day I fight with this. And how to use it after I compile?

    1 answer 1

    In the console where you are trying to build the library, execute the following bat file:

     C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat 

    With the parameter you need; possible options:

    • x86
    • amd64
    • arm
    • x86_arm
    • x86_amd64
    • amd64_x86
    • amd64_arm

    If you do not need exotic, and you are lost in the choice, then choose x86 for 32 bits, and x86_amd64 for 64.

    Execution of this bat file is necessary in order to set up all the necessary paths and environment variables for building. Depending on the parameter, different versions of the compiler and libraries are selected.

    • Thanks, all worked well! And what does this bat file do? And the second part of the question, what to do next, how to use it after compilation? - Nik
    • @Nik, bat file sets up environment variables for everything to be found. Regarding the second part: 2 questions in one, generally speaking, cannot be done. But, it's pretty simple, you will have a lib file at the output; How to connect the library in a particular execution environment, you can see in Google. - ixSci
    • Thank you And how do you know everything ... - Nik
    • @ixSci Well, maybe an explanation about what the batch file is doing in response to add? - Cerbo
    • one
      @Nik, you need to understand in what bit-rate you build and in what bit-rate you have an application, also, in order to build it with different bits, all compilers should be present in the studio. I have MSVS Professional and I have it all, if you have a free version, then, as far as I remember, the 64-bit compiler should be installed there separately - ixSci