Comments (6)
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.
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.
- 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.
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.
@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.
@phase5 , thanks. I wound up using Azul3D which includes this. It works now.
from glfw.
Related Issues (20)
- I can't run the case project properly HOT 2
- -
- No error handling in v3.3 HOT 5
- Old module name in README installation instructions HOT 3
- IME support HOT 6
- Build fail on macOS ventura 13.2.1 HOT 3
- How to use in windows? HOT 2
- v3.4 and supporting GLFW_MOUSE_PASSTHROUGH HOT 7
- Converting to execution character set: Illegal byte sequence
- can not build on macos 13.3.1 HOT 5
- Any way to try the glfw master branch to use libdecor ? HOT 1
- `(*glfw.Window).SetIcon` doesn't consider strides
- Unused import of image/draw after latest changes HOT 1
- Panic when creating cursor after latest changes HOT 1
- v3.3/glfw: GetKeyName incorrectly panics on unknown key and scancode HOT 6
- v3.3/glfw: CreateWindow can run into GLFW_NO_WINDOW_CONTEXT but doesn't accept it HOT 3
- v3.4/glfw: add support for GLFW version 3.4 (and future 3.4.x versions) HOT 7
- v3.3/glfw: Update to v3.3.10
- scripts: Grab upstream fails to apply patch for v3.2 HOT 1
- Old linux version cannot build successful
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glfw.