irishgreencitrus / raylib.v

A simple wrapper for raylib in V

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running code without installing the package

hholst80 opened this issue · comments

Bug Description

It is not clear how to check out this code and run the examples without installing the package.

I am used to be able to run vlib code without having to install v packages explicitly, and this is a very efficient workflow. Compared with pip install -e . but without the symlink boilerplate.

Steps to Reproduce

I] root@trump ~/C/raylib/examples (main) 
# v -cc gcc run core_basic_window.v 
==================
/tmp/v_0/core_basic_window.01HWP1E5CY35P7FCBKXTJTH1GS.tmp.c:933:9: error: unknown type name ‘Color’
  933 | typedef Color raylibv__Color;
      |         ^~~~~
/tmp/v_0/core_basic_window.01HWP1E5CY35P7FCBKXTJTH1GS.tmp.c:934:9: error: unknown type name ‘Vector2’
  934 | typedef Vector2 raylibv__Vector2;
      |         ^~~~~~~
/tmp/v_0/core_basic_window.01HWP1E5CY35P7FCBKXTJTH1GS.tmp.c:935:9: error: unknown type name ‘Vector3’
  935 | typedef Vector3 raylibv__Vector3;
      |         ^~~~~~~
/tmp/v_0/core_basic_window.01HWP1E5CY35P7FCBKXTJTH1GS.tmp.c:936:9: error: unknown type name ‘Vector4’
  936 | typedef Vector4 raylibv__Vector4;
      |         ^~~~~~~
...
==================
(Use `v -cg` to print the entire error message)

builder error: 
==================
C error found. It should never happen, when compiling pure V code.
This is a V compiler bug, please report it using `v bug file.v`,
or goto https://github.com/vlang/v/issues/new/choose .
You can also use #help on Discord: https://discord.gg/vlang .

Intended Behaviour

The example should compile and run just fine.

Known Workarounds (if any)

v install might work, but I do not want to install a package I want to work on the package itself to try and make TCC functional.

raylib.v commit hash

2ef075b

Environment Details (OS name and version, etc.)

V full version: V 0.4.5 bfd53a9.caa5fb4
OS: linux, "Artix Linux"
Processor: 4 cpus, 64bit, little endian, Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz

getwd: /home/root/Code/raylib/examples
vexe: /home/root/Apps/v/v
vexe mtime: 2024-04-29 22:48:49

vroot: OK, value: /home/root/Apps/v
VMODULES: OK, value: /home/root/.vmodules
VTMP: OK, value: /tmp/v_0

Git version: git version 2.44.0
Git vroot status: weekly.2024.17-60-gcaa5fb4b
.git/config present: true

CC version: cc (GCC) 13.2.1 20230801
thirdparty/tcc status: thirdparty-linux-amd64 40e5cbb5