Page 2 of 7

Re: LÖVE-Nuklear - a lightweight immediate mode GUI

Posted: Mon Nov 28, 2016 2:16 am
by keharriso
Sorry for the OS X trouble. I don't have a Mac, so I can't compile and test Mac releases. If anyone has any suggestions to make the CMake script work better for Mac, feel free to open an issue or pull request.

Re: LÖVE-Nuklear - a lightweight immediate mode GUI

Posted: Mon Nov 28, 2016 8:29 pm
by master both
Sorry for the misunderstanding, I'm not very experienced with cmake and I just asumed that my build would work on any macOS, my bad.
I did add some paths to this file when I build it, mainly my version of LuaJIT that I got from Homebrew.

Re: LÖVE-Nuklear - a lightweight immediate mode GUI

Posted: Sat Dec 03, 2016 2:44 am
by jonandev
Just starting with lua and LÖVE and figured I'd give this library a try. I got everything built on MacOS, but getting a crash on initialization. Here's the stack trace:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 LuaJIT.LuaJIT 0x0000000105f7ab02 0x105f78000 + 11010
1 nuklear.so 0x000000000a1fa4b1 nk_love_init + 449
2 LuaJIT.LuaJIT 0x0000000105f7ab36 0x105f78000 + 11062
3 org.love2d.love 0x0000000105c89570 0x105c87000 + 9584

I'm not sure if maybe I have a version mismatch (love 0.10.1, luaJIT 2.0.3_1, latest Nuklear from git)? Or maybe something isn't being found (some initialization data file)? Any ideas would be greatly appreciated! Thank you

Re: LÖVE-Nuklear - a lightweight immediate mode GUI

Posted: Sat Dec 03, 2016 4:18 pm
by jonandev
I forgot to mention that I get the same results running my little test project or the example. I'm running the example like this:

Code: Select all

Jonathans-MBP:love-nuklear$ love example/.
Playing with this some more when I get home later...

Re: LÖVE-Nuklear - a lightweight immediate mode GUI

Posted: Sat Dec 03, 2016 5:42 pm
by Positive07
LÖVE's current version is 0.10.2, and it internally uses LuaJIT 2.0.4 so you are using older libraries... I don't think that is the problem though, but you can try updating both. I'm not a Mac user so I can't help sorry

Re: LÖVE-Nuklear - a lightweight immediate mode GUI

Posted: Sun Dec 04, 2016 12:20 am
by jonandev
Thanks Positive07. I downloaded Zerobrane in an attempt to debug the crash, but the example works in there! So I think you're right that the versions are probably not the problem. :)

Re: LÖVE-Nuklear - a lightweight immediate mode GUI

Posted: Sun Dec 04, 2016 1:01 am
by jonandev
I tried running outside of Zerobrane, but still starting up mobdebug first. That works too. Here's new love.load()

Code: Select all

function love.load()
  if arg[#arg] == "-debug" then require("mobdebug").start() end
  nk.init()
end
I copied mobdebug.lua into the example project. Also updated to LÖVE 0.10.2, but homebrew has me stuck at LuaJIT 2.0.3_1 for now. No difference after the switch. Any other mac users out there who might be able to help? Thanks!

And thanks to everyone who has worked on LÖVE2d. It's gotten me back into programming, but more importantly, my son is getting interested too!

Re: LÖVE-Nuklear - a lightweight immediate mode GUI

Posted: Mon Feb 06, 2017 9:34 am
by Jack5500
Has anybody got any more detailed instructions on the steps required to get this to compile?

Re: LÖVE-Nuklear - a lightweight immediate mode GUI

Posted: Mon Feb 06, 2017 2:53 pm
by Tanner
For OSX, running `brew install luajit` should be enough. You should get some thing similar to this when running `cmake`.

Code: Select all

-- The C compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found LuaJIT: /usr/local/lib/libluajit-5.1.dylib (found version "2.0.4")
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/tanner/code/c/love-nuklear/build
Using `brew install luajit [--devel||--HEAD]` does not work. You'll need the same version of Luajit that Love uses. After that, just copying 'nuklear.so' into the example folder should get you up and running.

Re: LÖVE-Nuklear - a lightweight immediate mode GUI

Posted: Mon Feb 06, 2017 2:58 pm
by Jack5500
Ok, seems easy enough on Mac, but I'm trying it on a Windows machine. Are you just running cmake when everything is installed or did you configure anything additionally?