lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I hope I am asking this on the right place, sorry if not.
I am an advanced c++ windows programmer and have used LUA for years now. I use lua in almost all my C++ projects (currently a 3d game engine). Now that I am trying to port to Mac OS, I want to get lua working on a simple xcode test project (I want to use xcode 4 to build, I am not good with command line things).

I have tried to simply use the libraries and includes for mac os from http://luabinaries.sourceforge.net/download.html, I could my my project compile and link but when running, I get from the debugger:
dyld: Library not loaded: liblua5.1.dylib
Referenced from: /Users/dirk/Library/Developer/Xcode/DerivedData/luaTest-baatbabovkeyxadjtjiknwmhoykz/Build/Products/Debug/luaTest.app/Contents/MacOS/luaTest
  Reason: image not found
and the program won't continue.

I have also tried the Lua.framework thing at http://www.malcolmhardie.com/opensource/LuaFramework/index.html and I got even more problems. Where a framework should make including and linking easy, I had very much problems getting it compiled/linked. After I succeeded (in a very unnatural way imo), running failed again with a similar error as above, just other filenames that could not be found.

I have been trying to get this to work for three days now and I am getting very frustrated. Can anyone PLEASE give me step by step instructions on how to get things working (just one line of code should work to get me started: lua_State *L = luaL_newstate(); and it runs. It's fine if that line is just inside the basic .mm file that is generated by the project wizard. I must admit that I am very new to Mac programming, but I managed to create other test projects fairly easily and even succeeded at creating some cross-platform code that I am very proud of.

To be clear: I want this application to be a real mac-app, something that can just be a .app file and runs standalone. I don't want to have to ask people to install all kinds of stuff to get my app working. Another thing: I would love it if I can just add the necessary header/library files to my source tree of my project, so that everyone who wants to build my code can just do it by downloading my code, and not needing other downloads/copying files to specific directories/etc...
If any of the above is just not possible, just tell me.

Any help is greatly appreciated!

Best regards,
Dirk.