Coder Social home page Coder Social logo

Comments (7)

Dacode45 avatar Dacode45 commented on May 18, 2024 1

It's probably this line in raylib-sys/build.rs

Platform::RPI => conf.define("PLATFORM", "Raspberry Pi"),

from raylib-rs.

crazyStewie avatar crazyStewie commented on May 18, 2024

To run the examples, you can go to the samples folder with cd samples, and execute the example you want using cargo run --bin EXAMPLE. For example, if you want to execute the raymarch example, run cargo run --bin raymarch

from raylib-rs.

zertyz avatar zertyz commented on May 18, 2024

Great. Now I could compile.
Maybe that should be on the README?

On raspberry pi, raylib can also run using the Broadcom Drivers.
How to make the binaries not depend on X?

INFO: Initializing raylib 2.5
WARNING: [GLFW3 Error] Code: 65544 Decription: X11: The DISPLAY environment variable is missing
WARNING: Failed to initialize GLFW
INFO: [static/logo.png] Image loaded successfully (16x16)
WARNING: [GLFW3 Error] Code: 65537 Decription: The GLFW library is not initialized
INFO: Target time per frame: 16.667 milliseconds
Segmentation fault (core dumped)

from raylib-rs.

zertyz avatar zertyz commented on May 18, 2024

I guess I figured it out?

There were these lines missing on raylib-sys/build.rs:252:
} else if target.contains("armv6l-unknown-linux") {
Platform::RPI

... also there should be one for armv8... rPi3

Now I'm rebuilding everything to test.

I didn't figured it out yet how override the default build options... for instance, even o rPi 1, 2 & 3 one might want to use raylib inside X. Is this done via some sort of build flag?

Thanks for your attention.

from raylib-rs.

Dacode45 avatar Dacode45 commented on May 18, 2024

Hey, haven't tested the library with rpi yet. I would try to follow the official raylib wiki to see how it's done.

from raylib-rs.

zertyz avatar zertyz commented on May 18, 2024

Yes. I have successfully built & run the C/C++ version in standalone mode before for rPis 1, 2 & 3. Its a meter of passing the define flag PLATFORM=RPI at build time. I don't known rust enough yet to see where this should be done.

BTW my mentioned attempt on the messages above didn't work.

from raylib-rs.

zertyz avatar zertyz commented on May 18, 2024

It ended up not working. The samples must also be compiled with this flag. I'll learn rust a little more so I can eventually contribute with a P.R. Thanks for you attention.

from raylib-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.