Skip to content

[Linux] Error in Build in Cartpole Example due to sdl2-gfxΒ #11

@yunho-c

Description

@yunho-c

Hi, I encountered a few errors in building the cartpole example.

I was able to get them sorted out, but still making this issue to document. Things I had to do to solve:

  • Install cmake (sudo apt install cmake)
    • This was a fresh installation that didn't happen to have cmake installed, which is unlikely, yet possible for beginners/students
  • Add the following lines to cargo.toml (not sure if this is strictly required... but nonetheless resolved an error)
    • and run cargo vcpkg build before cargo build
[package]
name = "gym-rs"
...

[dependencies]
...

+ [package.metadata.vcpkg]
+ dependencies = ["sdl2", "sdl2-gfx"]
+ git = "https://github.com/microsoft/vcpkg"
+ rev = "501db0f" # or change based on the latest release in GitHub
  • Install libsdl2-gfx-dev in addition to libsdl2-dev
    • I feel that other users may encounter the same issue; perhaps would be good to update readme

Thanks for making this awesome library! Feel free to investigate more or close the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions