c++ - Compile CMake based project with minGW -
i want use signalr in windows project compiled mingw (msys2). far know cannot link against library (dll) compiled compiler (i.e. vc++).
hence, need compile signalr mingw. here repository:
https://github.com/aspnet/signalr-client-cpp
the project based on cmake rather standard makefile. did:
- downloaded cmake: https://cmake.org/files/v3.8/cmake-3.8.0-win32-x86.zip
- extracted folder (i.e. c:/dev)
- exported cmake/bin folder path var (in /etc/profile)
- checked if works :) cmake --version
- cloned cpp rest sdk (https://github.com/microsoft/cpprestsdk.git)
trying compile cpp rest sdk described here:
https://github.com/microsoft/cpprestsdk/wiki/how-to-build-for-linux
leads output:
$ cmake .. -dcmake_build_type=release -- building for: visual studio 15 2017 -- c compiler identification msvc 19.10.25019.0 -- cxx compiler identification msvc 19.10.25019.0 -- check working c compiler: c:/program files/microsoft visual studio/2017/community/vc/tools/msvc/14.10.25017/bin/hostx86/x86/cl.exe -- check working c compiler: c:/program files/microsoft visual studio/2017/community/vc/tools/msvc/14.10.25017/bin/hostx86/x86/cl.exe -- works
i'm afraid it's still using msvc compiler output binaries won't compatible application.
how should compile libraries?
cmake not build itself. rather generates configuration files make, msbuild, ninja, etc. each platform has default generator. windows, visual studio/nmake.
you can select generator manually cmake’s -g
option. generator names contain spaces. make sure put quotes around those.
Comments
Post a Comment