[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Cross-platform way to compile a Lua module written in C
- From: Dibyendu Majumdar <mobile@...>
- Date: Thu, 22 Jul 2021 21:32:08 +0100
On Wed, 21 Jul 2021 at 15:25, Dibyendu Majumdar <mobile@majumdar.org.uk> wrote:
>
> On Wed, 21 Jul 2021 at 15:12, Hugo Musso Gualandi
> <hgualandi@inf.puc-rio.br> wrote:
>
> > If you wouldn't mind, could you help me find the part of the source
> > code that is responsible for this? The one I could find is using
> > Linux-specific compilation flags, which is the same thing we're doing
> > for Pallene right now.
> >
> > https://github.com/dibyendumajumdar/ravi/blob/2eda81f17c920bc0762ab810b1f116965603d763/aot-examples/gaussian2_aot.lua
> >
>
> Sadly I too only have gcc/Linux at the moment - expanding this is in
> my TODO list.
> I will share here if I make progress on this.
On Windows using Visual Studio 2019 / X64 cmd line this appears to work:
cl /c /Os /D WIN32 /DMD gaussian2_lib.c
link /LIBPATH:/path/to/ravi/lib libravi.lib /DLL /MACHINE:X64
/OUT:gaussian2_lib.dll gaussian2_lib.obj
CMake can be used build a simple project and dump out the commands it
uses to invoke the compiler/linker. But it tends to have lots of
options that I suspect aren't needed.