Closed Martinfx closed 5 years ago
I have not tested on FreeBSD. The error message shows that X Window Header is missing. You may try installing the X development library on the machine.
Yes i know. I have this headers in my machine.
/usr/local/include/X11/Xlib.h
/usr/local/include/GL/glx.h
Maybe /usr/local/include
is not in the default include path, try CGO_CFLAGS="-I/usr/local/include" go build
Thank you for fot the path but failed linker with go build
# github.com/go-gl/gl/v3.3-core/gl
/usr/bin/ld: cannot find -lGL
clang: error: linker command failed with exit code 1 (use -v to see invocation)
# github.com/go-gl/gl/v3.3-core/gl
../../go/pkg/mod/github.com/go-gl/gl@v0.0.0-20170915061432-ac0d3d2af0fe/v3.3-core/gl/procaddr.go:54:28: warning: passing 'const char *' to parameter of type 'const GLubyte *' (aka 'const unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
/usr/local/include/GL/glx.h:325:48: note: passing argument to parameter 'procname' here
# github.com/go-gl/glfw/v3.2/glfw
/usr/bin/ld: cannot find -lGL
clang: error: linker command failed with exit code 1 (use -v to see invocation)
trying CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib" go build
Thank you go build
go build
# github.com/go-gl/glfw/v3.2/glfw
In file included from ../../go/pkg/mod/github.com/go-gl/glfw@v0.0.0-20170814180746-513e4f2bf85c/v3.2/glfw/c_glfw.go:4:
In file included from ./glfw/src/context.c:28:
In file included from ./glfw/src/internal.h:169:
./glfw/src/x11_platform.h:36:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
^~~~~~~~~~~~
1 error generated.
^[[B# github.com/go-gl/gl/v3.3-core/gl
../../go/pkg/mod/github.com/go-gl/gl@v0.0.0-20170915061432-ac0d3d2af0fe/v3.3-core/gl/procaddr.go:52:11: fatal error: 'GL/glx.h' file not found
#include <GL/glx.h>
OK i found problem, this is right command only some warnings. Last problem i have with fish. Thank you M.
$ CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib" go build
# github.com/go-gl/gl/v3.3-core/gl
../../go/pkg/mod/github.com/go-gl/gl@v0.0.0-20170915061432-ac0d3d2af0fe/v3.3-core/gl/procaddr.go:54:28: warning: passing 'const char *' to parameter of type 'const GLubyte *' (aka 'const unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
/usr/local/include/GL/glx.h:325:48: note: passing argument to parameter 'procname' here
Hello i would like compile engine but i have problem with dependencies
go mod init go build