make without makefile after cmake

我只是一个虾纸丫 提交于 2020-05-09 06:19:14

问题


I try to use the c++ language bindings for the ev3dev lego brick: https://github.com/ddemidov/ev3dev-lang-cpp

The instruction is as follows:

mkdir build
cd build
cmake .. -DEV3DEV_PLATFORM=EV3
make

I am running windows and have cmake and mingw available. After running cmake it creates some files in the build directory. However: There is no makefile which could be picked of by make. So I am wondering how iam supposed to compile these bindings


回答1:


On Windows, CMake generates a MSVC solution by default. Check for a .sln file in your build directory.

The instructions you linked are assuming a Unix-ish platform, where the default is to create Makefiles.

If you actually want Makefiles on Windows, add -G "Unix Makefiles" to the cmake line.

If you want to use MSVC as compiler but work on the command line, another option is -G "NMake Makefiles", and calling nmake after that.

Make sure to delete your build directory before trying to build a new generator target. CMake can be touchy about that.

Check cmake --help for a list of available options. (Especially the generator targets are platform-specific.)



来源:https://stackoverflow.com/questions/39643291/make-without-makefile-after-cmake

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!