Mormert / jle

'Jet-Lagged Engine' is a work-in-progress C++/Lua game engine supporting Windows, Linux, Mac and browsers.
GNU General Public License v3.0
251 stars 18 forks source link

Build failed, missing “jleBuildConfig.h”? #23

Closed xrui94 closed 3 weeks ago

xrui94 commented 3 weeks ago

My OS is Windows 11, and using the msvc 2022. An compiling error occured: “jleBuildConfig.h”: No such file or directory

Mormert commented 3 weeks ago

Hi,

The "jleBuildConfig.h" is generated from this file: "jleBuildConfig.in.h" (https://github.com/Mormert/jle/blob/master/engine/jleBuildConfig.in.h

That is done when generating the project files with CMake.

Try navigating to the gametemplate folder, and then run:

mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -DJLE_BUILD_EDITOR=ON -DCMAKE_BUILD_TYPE=Release
cmake --build .

Note that this will generate a MSVC 2022 sln project. You can still use "cmake -- build ." and build the gametemplate without opening Visual Studio.

xrui94 commented 3 weeks ago

Hi,

The "jleBuildConfig.h" is generated from this file: "jleBuildConfig.in.h" (https://github.com/Mormert/jle/blob/master/engine/jleBuildConfig.in.h

That is done when generating the project files with CMake.

Try navigating to the gametemplate folder, and then run:

mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -DJLE_BUILD_EDITOR=ON -DCMAKE_BUILD_TYPE=Release
cmake --build .

Note that this will generate a MSVC 2022 sln project. You can still use "cmake -- build ." and build the gametemplate without opening Visual Studio.

Thank you for your reply. Yes,I should make the build directory in the “gametemplate” directory instead of the “engine” directory.