Vs2022 xlua integrated third-party library compilation error Generator Visual Studio 15 2017 could not find any instance of Visual Studio.

build_xlua_with_libs

Executing the .bat directly after downloading the warehouse will report the following error

CMake Error:
  Generator

    Visual Studio 15 2017

  could not find any instance of Visual Studio.

Solution:

  1. First make sure that Visual Studio has installed the cmake component

[External link picture transfer failed, the source site may have an anti-theft link mechanism, it is recommended to save the picture and upload it directly
insert image description here

  1. Referring to the other articles above, install the two loads Desktop Development with C++ and Visual Studio Extension Development. Not sure if it's necessary, I installed it.

  2. Modify the generator in the .bat file, if it is Visual Studio 2022, modify it toVisual Studio 17 2022

mkdir build64 & pushd build64
cmake -G "Visual Studio 17 2022" ..
popd
cmake --build build64 --config Release
md plugin_lua53\Plugins\x86_64
copy /Y build64\Release\xlua.dll plugin_lua53\Plugins\x86_64\xlua.dll
pause

In fact, the generator corresponding to the Visual Studio version can be viewed in CMAKE-GUI

insert image description here
my new blog

Guess you like

Origin blog.csdn.net/qq_17515481/article/details/122543915