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

Build issues (might just be me) #21

Open
Fahersto opened this issue Apr 18, 2024 · 3 comments
Open

Build issues (might just be me) #21

Fahersto opened this issue Apr 18, 2024 · 3 comments
Labels
compile-issue The code doesn't compile properly

Comments

@Fahersto
Copy link

Fahersto commented Apr 18, 2024

Hey,
After watching your showcase on youtube I tried to build you engine by following the README but there does not appear to be a CMakeList file at the top level. Is this expected? Maybe I just understood your intructions wrong?

@Mormert
Copy link
Owner

Mormert commented Apr 18, 2024

Hi, thanks for your interest!

There is a game template which contains the boilerplate code (including CMakeLists.txt) but with no game assets or game logic, just to get started, here: https://github.com/Mormert/jle/tree/master/gametemplate
Each game that is made, you just copy that folder and adapt it to your needs. It expects the engine folder to be next to it, btw.

If you are interested in a "test project", (WARNING: currently running an outdated version of the engine), you can check this repo out: https://github.com/Mormert/cgfx

I'd like to ask you also, would you be interested in a simple "demo game" with the engine? Something to just get started with perhaps. Currently there is no such thing, just that repo I provided above (and of course the main game that I am working on, but that is not shared publicly).

@Fahersto
Copy link
Author

Fahersto commented Apr 19, 2024

Thank you for your reply. With the information you provided I attempted several ways to build the engine:

Ubuntu terminal:

  • git clone https://github.com/Mormert/jle.git --recurse-submodules
  • cd gametemplate
  • mkdir build
  • cd build
  • cmake .. -DJLE_BUILD_EDITOR=ON -DCMAKE_BUILD_TYPE=Release
  • cmake --build .

image

Ubuntu VS Code

  • Open jle folder in vs code
  • use CMake plugin and set "cmake.sourceDirectory": "/home/fahersto/playground/jle/gametemplate"
  • start build using the VS code GUI which runs "/usr/bin/cmake --build /home/fahersto/playground/jle/build --config Debug --target all -j 10 --"
    Also run into error: [build] /usr/bin/ld: ../lua/libvanilla_luad.a(lstate.c.o): relocation R_X86_64_PC32 against symbol `lua_newstate' can not be used when making a shared object; recompile with -fPIC

Windows VS Code and Visual Studio 2022
I run into compile errors with glad. I suspect my environment might be the issue. Sometimes having packages such as glad also installed via vcpkg seems to mess things up.

I also had the same issues when attempting to build cgfx.

Regarding your question about a demo game I believe this would be very nice to have. However, I myself am mostly interested about the feel of using your engine and the technical side of it. I'm currently working on my own engine so my I'm set on attempting to ship a game in my engine 😄

@Mormert
Copy link
Owner

Mormert commented Apr 20, 2024

Regarding building on various platforms, as the engine is in constant development, not all platforms are always compiling, and a fast way to check which platforms are currently building is to check the build status in the README here: https://github.com/Mormert/jle?tab=readme-ov-file#build-status

You can also view details of builds here: https://github.com/Mormert/jle/actions

As can be seen, currently, Windows and MacOS are building succesfully in tests (but not Linux!)

Thus, I recommend if you want to test the bleeding edge version of the engine, to do so on Windows (as that is what the engine is being developed on). I think you have GLAD installed via vcpkg is causing issues, make sure to disable vcpkg.

Building on Windows, you can do with CMake as well, running (basically what you did on Ubuntu)

cmake .. -DJLE_BUILD_EDITOR=ON -DCMAKE_BUILD_TYPE=Release
cmake --build .

You may need to specifically say to CMake that you want to use Visual Studio compiler (we don't support MinGW on Windows), do that by:

Run CMake to configure the project. Replace with the appropriate generator string for your installed version of Visual Studio. Here are some examples:
For Visual Studio 2019: "Visual Studio 16 2019"
For Visual Studio 2022: "Visual Studio 17 2022"

Then instead run:

cmake .. -G "" -DJLE_BUILD_EDITOR=ON -DCMAKE_BUILD_TYPE=Release
cmake --build .

I also noticed you tried VS Code. I can recommend CLion as that is what Jet-Lagged Engine is being developed with, and works on all OSes, including Windows.

@Mormert Mormert added the compile-issue The code doesn't compile properly label Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compile-issue The code doesn't compile properly
Projects
None yet
Development

No branches or pull requests

2 participants