Luigi has shown me a simple and useful application of ffi:
In the case of lua(jit)tex in W32TeX, which are used in context, standard C libraries are linked statically. Thus it is necessary to load a necessary DLL for standard C functions, like the following meaningless example: \starttext $$ j0(1.765)= \startluacode ffi=require("ffi") ffi.cdef[[ double _j0(double x); ]] -- In the case of lua(jit)tex in W32TeX, C libraries are linked -- statically. Thus it is necessary to load a necessary DLL. local msvcrt=ffi.load("msvcrt") tex.print(msvcrt._j0(1.765)) \stopluacode $$ \stoptext It is expected that Windows APIs in the following libs can be used without loading DLL: WSOCK32.dll USER32.dll ADVAPI32.dll SHELL32.dll GDI32.dll KERNEL32.dll WS2_32.dll Best, Akira
participants (1)
-
Akira Kakuto