faiface / pixel

A hand-crafted 2D game library in Go
MIT License
4.43k stars 244 forks source link

Having problems running the example #294

Closed elvodqa closed 2 years ago

elvodqa commented 2 years ago

I'm trying to run the "creating window" example. But I'm getting compiler errors. And I'm getting similar errors for trying to run go-gl programs. I was using mingw 32 or 64, I'm not sure but I recently reinstalled mingw-64.

C:\Program Files\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1 C:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: Dwarf Error: Can't find .debug_ranges section. C:\Users\user\AppData\Local\Temp\go-link-945746887\000002.o:c_glfw.cgo2.c:(.text+0xc7e): undefined reference to __imp__wassert' C:\Users\user\AppData\Local\Temp\go-link-945746887\000002.o:c_glfw.cgo2.c:(.text+0xe9e): undefined reference toimpwassert' C:\Users\user\AppData\Local\Temp\go-link-945746887\000002.o:c_glfw.cgo2.c:(.text+0x13d6): undefined reference to __imp__wassert' C:\Users\user\AppData\Local\Temp\go-link-945746887\000002.o:c_glfw.cgo2.c:(.text+0x2966): undefined reference toimpwassert' C:\Users\user\AppData\Local\Temp\go-link-945746887\000002.o:c_glfw.cgo2.c:(.text+0x2b56): undefined reference to __imp__wassert' C:\Users\user\AppData\Local\Temp\go-link-945746887\000002.o:c_glfw.cgo2.c:(.text+0x2cf6): more undefined references toimpwassert' follow collect2.exe: error: ld returned 1 exit status

dusk125 commented 2 years ago

What's the output for gcc --version and ld --version

dusk125 commented 2 years ago

Also I don't know if you followed this or not, but check out our Doc for getting started with this project on Windows.