Installing sdl2/raylib?(linux mint,vs code)

Hi, could someone help me with installing sdl2 or raylib on my pc?
I am new to Go and would like to learn it doing some mini games
but I need the installation of an graphic lib first and installation feels like AAAAAARRRRGGGHH!

I tried installation hints from yt vids but it does not work with 1.18(?)

Game Dev With Go: Flappy Bird(ish)

Games With Go EP 06 - SDL2 Setup

my console:
"
notevil@Furya:~$ go get -v -u link.com/gen2brain/raylib-go/raylib
go: go.mod file not found in current directory or any parent directory.
‘go get’ is no longer supported outside a module.
To build and install a command, use ‘go install’ with a version,
like ‘go install example.com/cmd@latest
For more information, see link
or run ‘go help get’ or ‘go help install’.
notevil@Furya:~$ go install -v -u link@latest
flag provided but not defined: -u
usage: go install [build flags] [packages]
Run ‘go help install’ for details.
notevil@Furya:~$ go install link@latest
package link.com/gen2brain/raylib-go/raylib is not a main package
notevil@Furya:~$
"

and with sdl2 I have broken import in vs code:

"
could not import link.com/veandco/go-sdl2/sdl (cannot find package “link.com/veandco/go-sdl2/sdl” in any of
/home/notevil/.go/src/github.com/veandco/go-sdl2/sdl (from $GOROOT)
/home/notevil/go/src/github.com/veandco/go-sdl2/sdl (from $GOPATH))compilerBrokenImport"

1 Like

can someone tell me what is not a main package means in go context?
go install link.com/veandco/go-sdl2/{sdl,img,mix,ttf}@latest
go: downloading link.com/veandco/go-sdl2 v0.4.17
package link.com/veandco/go-sdl2/sdl is not a main package
package link.com/veandco/go-sdl2/img is not a main package
package link.com/veandco/go-sdl2/mix is not a main package
package link.com/veandco/go-sdl2/ttf is not a main package

is 1.18 the problem? I had an older version on my laptop about year ago, and sdl2 on it

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.