Comments (9)
Did you have a static or dynamic glfw3 library?
It used to be the case that you needed dynamic, but that seems to be changing over time.
from glfw.
Quite frankly, no idea. I grabbed the glfw3 sources, generated the make files, compiled and installed. Not sure what's the default there.
In this case it seems to be dynamic since I had to link all the other libraries, correct?
from glfw.
Use cmake -DBUILD_SHARED_LIBS=ON.
Right now we're only using static lib on mac os because of the mentioned
reasons in that issue.
Most linux distributions come with the dyanmic library.
On Aug 6, 2013 7:31 AM, "Fernando Correa Neto" [email protected]
wrote:
Quite frankly, no idea. I grabbed the glfw3 sources, generated the make
files, compiled and installed. Not sure what's the default there.
In this case it seems to be dynamic since I had to link all the other
libraries, correct?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/42#issuecomment-22157798
.
from glfw.
I used cmake -DBUILD_SHARED_LIBS=ON. Still could not go install.
Do the trick as fcorrea mentioned, go install ok.
Is there any method one could tell whether the compiled libglfw.so and libglfw3.a is static or dynamic?
Thanks.
from glfw.
*.so = shared object
*.a = static library
can you try to do this:
export LD_LIBRARY_PATH="/path/to/libglfw.so/"
go build github.com/go-gl/glfw3
from glfw.
It's weird.
I do have those .so files:
:/usr/local/lib$ ls
cmake libglfw.so libglfw.so.3.0 python2.7 site_ruby
libglfw3.a libglfw.so.3 pkgconfig R x86_64-linux-gnu
Still cannot build.
export LD_LIBRARY_PATH="/usr/local/lib/libglfw.so/"
go build github.com/go-gl/glfw3
I rm -rf the glfw3 directory, and go get again, still those errors:
github.com/go-gl/glfw3
/usr/local/lib/libglfw3.a(context.c.o): In function parseGLVersion': context.c:(.text+0x53): undefined reference to
glGetString'
/usr/local/lib/libglfw3.a(context.c.o): In function _glfwRefreshContextAttribs': context.c:(.text+0x907): undefined reference to
glGetIntegerv'
context.c:(.text+0x98a): undefined reference to glGetIntegerv' context.c:(.text+0x9df): undefined reference to
glGetIntegerv'
context.c:(.text+0xa32): undefined reference to glGetIntegerv' /usr/local/lib/libglfw3.a(context.c.o): In function
glfwExtensionSupported':
context.c:(.text+0xd59): undefined reference to glGetString' context.c:(.text+0xd93): undefined reference to
glGetIntegerv'
/usr/local/lib/libglfw3.a(gamma.c.o): In function glfwSetGamma': gamma.c:(.text+0x182): undefined reference to
pow'
/usr/local/lib/libglfw3.a(window.c.o): In function glfwCreateWindow': window.c:(.text+0x6f8): undefined reference to
glClear'
/usr/local/lib/libglfw3.a(x11_clipboard.c.o): In function writeTargetToProperty': x11_clipboard.c:(.text+0x112): undefined reference to
XChangeProperty'
x11_clipboard.c:(.text+0x238): undefined reference to XChangeProperty' x11_clipboard.c:(.text+0x2ad): undefined reference to
XChangeProperty'
x11_clipboard.c:(.text+0x2b9): undefined reference to XFree' x11_clipboard.c:(.text+0x2f3): undefined reference to
XInternAtom'
x11_clipboard.c:(.text+0x331): undefined reference to XChangeProperty' x11_clipboard.c:(.text+0x3d1): undefined reference to
XChangeProperty'
/usr/local/lib/libglfw3.a(x11_clipboard.c.o): In function _glfwHandleSelectionRequest': x11_clipboard.c:(.text+0x50e): undefined reference to
XSendEvent'
/usr/local/lib/libglfw3.a(x11_clipboard.c.o): In function _glfwPushSelectionToManager': x11_clipboard.c:(.text+0x57e): undefined reference to
XConvertSelection'
x11_clipboard.c:(.text+0x59e): undefined reference to XCheckIfEvent' /usr/local/lib/libglfw3.a(x11_clipboard.c.o): In function
_glfwPlatformSetClipboardString':
x11_clipboard.c:(.text+0x662): undefined reference to XSetSelectionOwner' x11_clipboard.c:(.text+0x67b): undefined reference to
XGetSelectionOwner'
..... and more
from glfw.
It should be
export LD_LIBRARY_PATH="/usr/local/lib/"
But if you don't want to do this everytime you're using glfw3, you can configure glfw with -DCMAKE_INSTALL_PREFIX=/usr
when running cmake. Then it will install everything under /usr/lib
which should be automatically found by cgo.
from glfw.
export still has no effect:
export LD_LIBRARY_PATH="/usr/local/lib/"
I make the glfw3 with the option as you told, everything is ok now.
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
sudo make
sudo make install
Thank you very much.
from glfw.
no problem
from glfw.
Related Issues (20)
- v3.3/glfw: warning: 'GLAPIENTRY' macro redefined HOT 2
- 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
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.