lua-users home
lua-l archive

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


Hey,

I would like to play around with the LuaSDL2 binding but I only get the following error:

----
lua: error loading module 'SDL' from file '/usr/local/lib/lua/5.2/SDL.so':
libSDL2-2.0.so.0: cannot open shared object file: No such file or directory
----

I started with this guide: https://redmine.malikania.fr/projects/luasdl2/wiki/Building_from_sources I installed SDL2 and the optional libs SDL_mixer, SDL_ttf, SDL_net and SDL_image with:

----
$ ./configure
$ make
$ make install
----

Now are all libs in the directory /usl/local/lib.

At the final step I did:

----
$ cd Lua-SDL2-version
$ mkdir _build_
$ cd _build_
$ cmake ..
$ make
# make install
----

All this steps worked with no problem. But if I try to run a tutorial from the website I get the described error:
https://redmine.malikania.fr/projects/luasdl2/wiki/Tutorial_01_-_Initialization

The adding of +/usr/local/lib/?.so;+ to the Lua cpath has no effect.
Do you(or anybody) have an idea what the problem is?

Best Regards,
Alexander

System Info:
MacBook 2006 early(Core Duo)
Ubuntu 14.04 32 bit

Am 26.04.2014 12:38, schrieb David Demelier:
Hi there,

I'm very happy to announce the first release candidate of Lua-SDL2
[1]. As I already announced a few
months ago, Lua-SDL2 is a pure C binding against SDL 2.0.3.

It is designed to be as close as possible to the official SDL C API
but with object orientation and
functions overload where possible. For instance, SDL_Window is mapped
to a Lua userdata object.

The Lua-SDL2 binding was currently tested on Windows 7 and FreeBSD. It
should compile on major
platforms which support C and SDL. Prebuilt binaries are available for Windows.

The SDL API is covered around 95% (of what can be implemented, DSO and
such are not counted), its API
is completely documented [2].

However, Lua-SDL2 now needs *your* help, by:

* Testing as much as possible, a lot of examples are available in the
examples/ and tutorials/
   directories.

* A few functions are not implemented, it's the case of Texture:lock
for instance which is terribly
   hard to implement from Lua because the C side expect to cast the
pixel pointer to the underlyling
   sized array which in Lua is impossible to do. Please provide me
feedback on how you want it to
   be implemented.

* Feedback, provide me some enhancement you may find obvious or
better. In the code or in the documentation :-).

* Testing Haptic and OpenGL functions, I don't have any haptic devices
so I can't test myself. For OpenGL, I never used
   it so I can't test neither.

Currently, Lua-SDL2 only supports Lua 5.2 and higher, I will add some
portability code for Lua 5.1 in the
next few days.

Enjoy this binding :-).

Kind regards,
David.

[1] https://redmine.malikania.fr/projects/luasdl2/wiki#Download
[2] https://redmine.malikania.fr/projects/luasdl2/wiki#Documentation