Ah crud. Wait. You wanna bundle a dynamic lib? :) That's not possible, you need to bundle the .a file (the static lib).
./mgit bundle --list-lua-modulesand
mgit bundle --list-alibsand see if you can find your lib in there. It should be in the alibs list.
And lemme guess, luasql doesn't come with static libs (most of them don't), so you need to compile. Probably need to make a build script too cuz most makefiles don't generate static libs.
Note that with bundle you can have both bundled libs and dynamic libs. So if you don't have mysql.a you can put
clib/luasql/mysql.soin the directory of your exe and it should work. But it won't be a single exe deployment quite obviously :)
It seems very wired that the compiled luajit is looking for the library named mysql.dll instead of mysql.so. I renamed it form extension so to dll it worked. FYI, I am running this in Ubuntu Linux x64. Can you please check if it is indeed looking up the wrong extension via a via OS platform. Thanks.
no field package.preload['luasql.mysql']
no file './luasql/mysql.lua'
no file './luasql/mysql/init.lua'
no file './clib/luasql/mysql.dll'
no file './clib/luasql.dll'
no symbol 'Blua_luasql_mysql'
no symbol 'luaopen_luasql_mysql'
Aha. That's why I was confused about windows/linux. Looks like you found a bug, it's here: https://github.com/luapower/bundle/blob/master/bundle_loader.lua
I'l go fix it.
Done. Please try again (haven't tested the change).
I would like to ask, How do I pull in the new update? I tried ./mgit pull bundle, well that is a no go. Thanks.
./mgit <repo> <git command>so
./mgit bundle pull
./mgit - bundle pull
The command does not work
./mgit bundle pull
Invalid option: pull
Compile and link together LuaJIT, Lua modules, Lua/C modules, C libraries,
and other static assets into a single fat executable.
Tested with mingw, gcc and clang on Windows, Linux and OSX respectively.
Written by Cosmin Apreutesei. Public Domain.
USAGE: mgit bundle options...
-o --output FILE Output executable (required
For when there's name clashes, there's a
./mgit - bundle pull, otherwise
./mgit bundle ...runs the bundle script.
Thanks. That fixed the problem.. I have compiled and the changes you have made works.