FAQ
Hi,

i'm trying to use opengl with go.
Therefore i tried Banthar-Opengl: https://github.com/banthar/gl
While on Linux everything works fine, i have troubles making it work
on windows.
Running a "go install" on the packages yields many of those:
C:\SOME\PATH\banthar\gl\_obj\gl.cgo2.o: In function
`_cgo_f94b1c8c2048_Cfunc_glActiveTexture':
./gl.go:58: undefined reference to `__imp___glewActiveTexture'

Usually i would say, that the glew32.lib isn't linked, however in gl.gol it
says:
// #cgo windows LDFLAGS: -lglew32 -lopengl32

I'm using Win7_64 with mingw-w64.
The 64bit Glew is installed.

Any ideas what is causing the problem or how to fix it?

--

Search Discussions

  • Minux at Nov 18, 2012 at 7:34 am

    On Sun, Nov 18, 2012 at 7:51 AM, Mathews wrote:

    Hi,

    i'm trying to use opengl with go.
    Therefore i tried Banthar-Opengl: https://github.com/banthar/gl
    While on Linux everything works fine, i have troubles making it work
    on windows.
    Running a "go install" on the packages yields many of those:
    C:\SOME\PATH\banthar\gl\_obj\gl.cgo2.o: In function
    `_cgo_f94b1c8c2048_Cfunc_glActiveTexture':
    ./gl.go:58: undefined reference to `__imp___glewActiveTexture'

    Usually i would say, that the glew32.lib isn't linked, however in gl.gol
    it says:
    // #cgo windows LDFLAGS: -lglew32 -lopengl32

    I'm using Win7_64 with mingw-w64.
    The 64bit Glew is installed.

    Any ideas what is causing the problem or how to fix it?
    make sure you can compile a C program that calls opengl and glew function
    with the LDFLAGS "-lglew32 -lopengl32".

    cgo doesn't need the xxx.lib file, it only needs to find the xxx.dll file.

    --
  • Mathews at Nov 18, 2012 at 10:38 am
    Ahh, thank you, found the mistake - the binaries from glew are only for
    Visual-Studio.
    Had to compile the glew-source with mingw.
    Anyone stumbling across the same problem, this thread<http://stackoverflow.com/questions/6005076/building-glew-on-windows-with-mingw>may help, if you
    don't want to install cygwin or the like to run the makefile.

    >

    --

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedNov 17, '12 at 11:51p
activeNov 18, '12 at 10:38a
posts3
users2
websitegolang.org

2 users in discussion

Mathews: 2 posts Minux: 1 post

People

Translate

site design / logo © 2022 Grokbase