chunqian / go-raylib

go-raylib is a simple and easy-to-use library to enjoy videogames programming
zlib License
44 stars 3 forks source link

Running `go build` throws error #16

Closed nonunknown closed 3 years ago

nonunknown commented 3 years ago

image

Note: I'm using go mod vendor which brings files to workspace folder:

image

edit: I was messing with the local files, seems to be a problem with cgo package?

image

Also according to the error message on the build process the file rglfw.c wasnt found, but I could find it here, just dont know how go does to find it:

image

IMPORTANT: This also happens on Linux (even after installing those packages: apt-get install libgl1-mesa-dev libxi-dev libxcursor-dev libxrandr-dev libxinerama-dev)

chunqian commented 3 years ago

I did not use vendor, I'll look at the later

nonunknown commented 3 years ago

ok, I would like to get some help , cause my job depends on this! I'm trying to running it on the server side, so go vendor is required!

nonunknown commented 3 years ago

So, I think I found the possible solution for this problem, seems its 100% related to path on the #include stuff, seems that the includes cant reach this folder:

image

go\pkg\mod\github.com\chunqian\go-raylib@v0.0.0-20210519095144-df36dae46c76\lib\raylib\src

chunqian commented 3 years ago

@nonunknown go mod vendor not support cgo, see this #1571 use vend instead of go mod vendor

nonunknown commented 3 years ago

WOW, it has worked like a glove in a hand! thanks @chunqian