Further to this question, I want to build luatex on Windows with the LuaSQL library baked in, at least with the ODBC drivers.

This post by Taco Hoekwater back in 2010 walks through the process for baking in luaxml-reader but it appears that the make/configure/build environment for luatex has moved on since then, making it challenging to apply his technique.

I am no automake guru, but I have got as far as being able to successfully build luatex.exe with MinGW, so I feel pretty close!

I am hoping that the results of my efforts will enable access to databases via ODBC directly from within LuaLaTeX documents. Given the existing issues with accessing lua libraries from luatex (see this question for example), I think a bespoke bake is the most viable option.

  • I think that the most difficult thing is how to get Lua C modules to compile on Windows, I've tried that with Harfbuzz and ended with total frustration. It's possible that things might be easier with the new Ubuntu subsystem in Windows 10, but I haven't tried that yet. – michal.h21 Nov 7 '16 at 11:44
  • 2
    swiglib may be of interest here but I'm far from being an expert on that matter. – cjorssen Nov 7 '16 at 11:47
  • After a long battle, I've managed to compile the luasql-odbc module with both Visual Studio 2015 and MinGW. Agreed, it was painful, but it works and I can access ODBC databases from the installation of lua (5.1 or 5.2) against which it was built. But that is a far cry from building it against the version of lua built into MikTeX... – dsla Nov 7 '16 at 11:50
  • @dsla in this case you can install the library somewhere luatex can see it. You can list these directories using package.cpath. – michal.h21 Nov 7 '16 at 12:25
  • @michal.h21 I wish it were so simple. I can find the dll, and even access it from lualatex with driver = package.loadlib("odbc.dll","luaopen_luasql_odbc") but this raises an error multiple Lua VMs detected which is how I got to where I am now... (see this question for example.) – dsla Nov 7 '16 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.