go-gl / gl

Go bindings for OpenGL (generated via glow)
MIT License
1.06k stars 72 forks source link

undefined reference to `__assert_func' #138

Closed zandercodes closed 3 years ago

zandercodes commented 3 years ago

I don't know why?

Error:

C:\Program Files\Go\pkg\tool\windows_amd64\link.exe: running g++ failed: exit status 1
c:/programdata/chocolatey/lib/winlibs/tools/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Julian\AppData\Local\Temp\go-link-527067591\000054.o: in function `glfwSetCursor':
C:\Go\pkg\mod\github.com\go-gl\glfw\v3.3\glfw@v0.0.0-20210410170116-ea3d685f79fb/glfw/src/input.c:820: undefined reference to `__assert_func'
c:/programdata/chocolatey/lib/winlibs/tools/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Julian\AppData\Local\Temp\go-link-527067591\000054.o: in function `glfwSwapBuffers':
C:\Go\pkg\mod\github.com\go-gl\glfw\v3.3\glfw@v0.0.0-20210410170116-ea3d685f79fb/glfw/src/context.c:646: undefined reference to `__assert_func'
c:/programdata/chocolatey/lib/winlibs/tools/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Julian\AppData\Local\Temp\go-link-527067591\000054.o: in function `glfwExtensionSupported':
C:\Go\pkg\mod\github.com\go-gl\glfw\v3.3\glfw@v0.0.0-20210410170116-ea3d685f79fb/glfw/src/context.c:680: undefined reference to `__assert_func'
c:/programdata/chocolatey/lib/winlibs/tools/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Julian\AppData\Local\Temp\go-link-527067591\000054.o: in function `glfwGetProcAddress':
C:\Go\pkg\mod\github.com\go-gl\glfw\v3.3\glfw@v0.0.0-20210410170116-ea3d685f79fb/glfw/src/context.c:746: undefined reference to `__assert_func'
c:/programdata/chocolatey/lib/winlibs/tools/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Julian\AppData\Local\Temp\go-link-527067591\000054.o: in function `glfwGetInputMode':
C:\Go\pkg\mod\github.com\go-gl\glfw\v3.3\glfw@v0.0.0-20210410170116-ea3d685f79fb/glfw/src/input.c:476: undefined reference to `__assert_func'
c:/programdata/chocolatey/lib/winlibs/tools/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Julian\AppData\Local\Temp\go-link-527067591\000054.o:C:\Go\pkg\mod\github.com\go-gl\glfw\v3.3\glfw@v0.0.0-20210410170116-ea3d685f79fb/glfw/src/input.c:501: more undefined references to `__assert_func' follow
collect2.exe: error: ld returned 1 exit status
dmitshur commented 3 years ago

Closing as duplicate of https://github.com/go-gl/glfw/issues/319.

Also please be aware that it's possible to clear the build cache with go clean -cache, as documented at https://pkg.go.dev/cmd/go#hdr-Remove_object_files_and_cached_files.