DFansler
Posts: 13
Joined: Sun Aug 31, 2014 12:14 pm
Location: North Carolina, USA
Contact: Website

RayLib and Geany

Sun Sep 15, 2019 9:11 pm

I had been using openvg with Geany on my raspberry pi 3. Just got in my Raspberry Pi 4 and discovered I had to update the os from stretch to buster, then discovered that openvg is no longer supported.

After doing a search, I found RayLib and it appears promising - however my limited experience is preventing me from figuring out how to setup the makefile for building a project with RayLib.

I tried the examples but never could get any of them to run. My knowledge of scripts is almost nonexistent.

If someone could show me what would be needed in Geany’s makefile to get RayLib to be included while using bcc, it would be greatly appreciated.
Kind regards,
David

User avatar
topguy
Posts: 5785
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: RayLib and Geany

Mon Sep 16, 2019 8:58 am

Did you build and install the RayLib library successfully ?

User avatar
Gavinmc42
Posts: 3759
Joined: Wed Aug 28, 2013 3:31 am

Re: RayLib and Geany

Mon Sep 16, 2019 9:21 am

Also try NanoVG, some have got that going.
I use Geany but for very simple stuff..

Raylib does VR stereo :o
Wonder when Pi4 will be supported?
I think with Pi4 you have to use OpenGL 3.0 and the driver also support OpenGLES 3.?
Use those in 2D with Z = 0?

I'm still unsure if the VC6 has the VG registers/control list removed, if not then OpenVG might be still possible.
Or if the VC4 ThreadX RTOS did all the OpenVG grunt work.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
topguy
Posts: 5785
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: RayLib and Geany

Mon Sep 16, 2019 11:01 am

I did a test build and install. ( not on a Pi )

Code: Select all

Install the project...
-- Install configuration: "Debug"
-- Installing: /usr/local/lib/libraylib.a
-- Installing: /usr/local/include/raylib.h
-- Installing: /usr/local/lib/pkgconfig/raylib.pc
-- Installing: /usr/local/lib/cmake/raylib/raylib-config-version.cmake
-- Installing: /usr/local/lib/cmake/raylib/raylib-config.cmake
also

Code: Select all

 pkg-config --cflags --libs raylib
-I/usr/local/include -L/usr/local/lib -lraylib -lGLU -lrt -lm -ldl

DFansler
Posts: 13
Joined: Sun Aug 31, 2014 12:14 pm
Location: North Carolina, USA
Contact: Website

Re: RayLib and Geany

Tue Sep 17, 2019 12:10 am

I deleted the raylib directory and sub directories and reinstalled raylib again - well tried to. Turns out that cmake is not part of the os and I had to install it. once I did, the installation went to completion.

I compiled the examples successfully, but when I click on the binary to run it, I have a choice of execute or execute in a terminal window. Execute has no visible results, the other shows a terminal window for the blink of an eye and it is gone.

I still have not figured out how to tie my c programs in Geany. I have included "raylib" in main.c and in the Geany makefile, I have included the path to raylib/src.

Any ideas?
Thanks,
David

User avatar
topguy
Posts: 5785
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: RayLib and Geany

Tue Sep 17, 2019 10:36 am

If you have done proper installation then:
/usr/local/include is the include path..
/usr/local/lib is the library path..

What I had in my previous answer is the end of the output from "sudo make install".

Return to “Graphics programming”