Giter Site home page Giter Site logo

include path? about glfw HOT 6 CLOSED

go-gl avatar go-gl commented on June 13, 2024
include path?

from glfw.

Comments (6)

tapir avatar tapir commented on June 13, 2024

GOPATH is where your "src" folder resides not where your include files are. Please refer to Go website for how to properly setup Go tools.

Also typically, you should install GLFW under your C/C++ compiler's directory (C:\MingW?), to the proper "lib" and "include" folders.

from glfw.

5k3105 avatar 5k3105 commented on June 13, 2024

CMake: Where to build the binaries:
Change it to C:\MinGW ?

then under CMAKE_INSTALL_PREFIX it automatically specifies C:\Program Files (x86)/GLFW

should this be C:\MinGW also?

from glfw.

tapir avatar tapir commented on June 13, 2024
  • Build GLFW with cmake -DBUILD_SHARED_LIBS=on
  • Copy "include/GLFW" folder to "mingw/include"
  • Rename glfw3dll.a to libglfw3dll.a and copy it to "mingw/lib"
  • Setup your GOPATH correctly (see Go website for how)
  • Now you can run go get github.com/go-gl/glfw3

from glfw.

5k3105 avatar 5k3105 commented on June 13, 2024

Using the CMake GUI I set a folder to build to, clicked configure, checked the BUILD_SHARED_LIBS, clicked generate.

Copied glfw3.dll to C:\MinGW\bin
Copied glfw3dll.a to C:\MinGW\lib as libglfw3dll.a
Copied original source folder contents of include/GLFW to C:\MinGW\include\GLFW

C:\Go\gocode>go get github.com/go-gl/glfw3

# github.com/go-gl/glfw3 src\github.com\go-gl\glfw3\clipboard.go:4:24: fatal error: GLFW/glfw3.h: No such file or directory //#include <GLFW/glfw3.h> ^ compilation terminated.

Originally the ^ was under the G in GLFW/glfw3.h now it is under the h.

GOPATH is simply set to C:\Go\gocode now.

from glfw.

phase5 avatar phase5 commented on June 13, 2024

@versa and for anyone else who looks at this...

I had this exact same problem and found a solution.

No idea if this is a bug in the mingw distribution, or how its supposed to be but the include folder doesn't appear to be the obvious one!

I was dropping my include files in here:
C:\Program Files\mingw-w64\x86_64-4.8.1-posix-seh-rt_v3-rev2\mingw64\include\GLFW

Turns out the correct location seems to be here:
C:\Program Files\mingw-w64\x86_64-4.8.1-posix-seh-rt_v3-rev2\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\GLFW

Weird eh? Works for me though. Hopefully it will for you too.

from glfw.

5k3105 avatar 5k3105 commented on June 13, 2024

@phase5 , thanks. I wound up using Azul3D which includes this. It works now.

from glfw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.