-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get examples working, Luajit 2.0.4, Os X 10.9.5 #1
Comments
Hi! First way. Put library (libglfw.so in my case) in directory with example files. -- './libglfw.3.1.dylib' in your case
local glfw = require 'glfw' ('./libglfw.so') Second way. Using precise path to library. -- '/opt/local/lib/libglfw.3.1.dylib' in your case
local glfw = require 'glfw' ('/usr/local/lib/libglfw.so') Third way. Function ffi.load doesn’t use package.cpath, but we can easy solve it. -- '/opt/local/lib/?.dylib' in your case, and 'libglfw.3.1' as name
-- also, package.cpath may be used instead of libpath
local libpath = '/usr/local/lib/?.so;'
local glfw = require 'glfw' (package.searchpath('libglfw', libpath)) |
Thanks @Playermet , I got it working with this:
Didn't realize you can change the library it points to on the another argument. Although when trying to run the examples, they just crash on my Os X system, maybe because the rendering is not doing anything? Not sure. |
Examples should show black screen, without crashes. Try insert this line before glfw.Init call: glfw.SetErrorCallback(print) What printed to the console after run? |
Actually now that I test again, the examples work, showing the empty buffer (black with some glitches from the uninitialized memory). Strange. Anyway, I guess this can be closed, thanks! |
You're welcome! |
Hello, I was testing out your Luajit GLFW bindings.
Running on Mac Os X 10.9.5, with Luajit 2.0.4 installed from MacPorts to /opt/local
When I try to run the examples, I just get this error message:
So apparently Luajit can't find my glfw libraries. I have also installed libglfw 3.1.2 from MacPorts under /opt/local, as shown here:
I tried also changing the code to directly point to the library by changing the 'name' variable, and also tried copying the libraries to the current working directory, no luck.
Can you tell me what I'm missing here? Thanks!
The text was updated successfully, but these errors were encountered: