lua-users home
lua-l archive

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


> I recently used this one[0,1] for the first
> time (my first serious Lua project, and first
> time doing anything HTTP with Lua).
> Managed to quickly get things done with it
> without too much fuss. It's also 100% Lua I
> think, so you won't have any problems
> compiling!

If memory serves, that module from Daurnimator depends on a lot of other modules, some of them substantial, notably cqueues and luaossl, which are in C.

It also depends on OpenSSL, which is in C, and that might not be lightweight enough, given that the OP specifically started out using MbedTLS. I have a Lua binary with LuaSocket, luaossl, LuaSec (q.v.) and OpenSSL statically linked… the OpenSSL part adds about 3.5MBytes to the final executable, bumping it up from just under 500KB to just over 4MB.

If the OP is having linker problems on Windows but not Linux… is the Linux executable *actually* statically linked in the end? Perhaps the code of curl and MbedTLS gets statically linked but the final binary nevertheless includes dynamic links to a bunch of other libraries that are needed to make the program work?

What does ldd say if you run it against the final Linux binary? Is it really a static binary? Or are there dynamic links to files that are sucked in so that curl or MbedTLS themselves will work?

What are the function names in the linker errors shown on Windows?