tinygo-org / tinygo

Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
https://tinygo.org
Other
15.49k stars 913 forks source link

Cannot find headers for ebitengine #4606

Open symful opened 6 days ago

symful commented 6 days ago

Ebitengine Version

2.8.4

Operating System

Go Version (go version)

tinygo version 0.34.0 linux/amd64 (using go version go1.23.1 and LLVM version 18.1.2)

What steps will reproduce the problem?

  1. Clone the main repository of ebitengine
    git clone https://github.com/hajimehoshi/ebiten/
  2. Open one of the examples folders
  3. Run tinygo run .
# github.com/hajimehoshi/ebiten/v2/internal/glfw
../../internal/glfw/glfw3native_unix.h:105:12: fatal: 'X11/Xlib.h' file not found
../../internal/glfw/native_linbsd.go:14:12: note: in file included from native_linbsd.go!cgo.c:7:

What is the expected result?

Able to use ebitengine within tinygo

What happens instead?

Cannot find the required headers for ebitengine

Anything else feel useful to add?

I wanted to do

go run github.com/hajimehoshi/ebiten/v2/examples/airship@latest

and tinygo just exits, unlike Go.

aykevl commented 6 days ago

At the moment we don't support linking against C libraries on the host (as is needed for glfw). This may be added at some point, but will take some work.