Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you write build instructions for mingw and windows #357

Closed
claus007 opened this issue Sep 28, 2018 · 1 comment
Closed

Could you write build instructions for mingw and windows #357

claus007 opened this issue Sep 28, 2018 · 1 comment

Comments

@claus007
Copy link

System information

SolveSpace version: Self compiled master branch

Operating system: Windows 10

Expected behavior

What should have happened?
It should compiled

Actual behavior

What actually happened?
It does not

Additional information

Installed mingw64
Installed cmake

checked out git and did update submodules

cd solvespace
mkdir build
cd build

Now first try

C:/solvespace/build/>cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw64.cmake -DCMAKE_BUILD_TYPE=Release
-- Building for: NMake Makefiles
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:32 (project):
  The CMAKE_C_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:32 (project):
  The CMAKE_CXX_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "C:/solvespace/build/CMakeFiles/CMakeOutput.log".
See also "C:/solvespace/build/CMakeFiles/CMakeError.log".

##Second Try

C:\Projects\OS\solvespace\build>cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
CMake Error: Error: generator : MinGW Makefiles
Does not match the generator used previously: NMake Makefiles
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.

C:\Projects\OS\solvespace\build>rm CMakeCache.txt

##Third try
(lacking time - gadda go)

@whitequark
Copy link
Contributor

You should only use -DCMAKE_TOOLCHAIN_FILE for cross-compilation, never for native builds. -G "MinGW Makefiles" is the right thing to use, just remove the entire build tree and rebuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants