Skip to content
This repository has been archived by the owner on Nov 4, 2023. It is now read-only.

Build on mingw on Windows #62

Open
moteus opened this issue Oct 21, 2013 · 1 comment
Open

Build on mingw on Windows #62

moteus opened this issue Oct 21, 2013 · 1 comment

Comments

@moteus
Copy link

moteus commented Oct 21, 2013

this is my simple bat file

G:\lua\5.1\lua.exe dynasm\dynasm.lua -LNE -D X64 -D X64WIN -o call_x64win.h call_x86.dasc
G:\lua\5.1\lua.exe dynasm\dynasm.lua -LNE -D X32WIN -o call_x86.h call_x86.dasc
G:\lua\5.1\lua.exe dynasm\dynasm.lua -LNE -D X64 -o call_x64.h call_x86.dasc
G:\lua\5.1\lua.exe dynasm\dynasm.lua -LNE -o call_arm.h call_arm.dasc
gcc -O2 -g0 -Wall -Werror -fvisibility=hidden -Wno-unused-function --std=gnu99 -o test.o -c test.c
gcc -shared -fPIC test.o -o test_cdecl.dll
gcc -O2 -g0 -Wall -Werror -fvisibility=hidden -Wno-unused-function --std=gnu99 -D_WIN32_WINNT=0x0501 -IG:\lua\5.1\include -o ffi.o -c ffi.c
gcc -O2 -g0 -Wall -Werror -fvisibility=hidden -Wno-unused-function --std=gnu99 -D_WIN32_WINNT=0x0501 -IG:\lua\5.1\include -o ctype.o -c ctype.c
gcc -O2 -g0 -Wall -Werror -fvisibility=hidden -Wno-unused-function --std=gnu99 -D_WIN32_WINNT=0x0501 -IG:\lua\5.1\include -o parser.o -c parser.c
gcc -O2 -g0 -Wall -Werror -fvisibility=hidden -Wno-unused-function --std=gnu99 -D_WIN32_WINNT=0x0501 -IG:\lua\5.1\include -o call.o -c call.c
gcc -shared ffi.o ctype.o parser.o call.o G:\lua\5.1\lua5.1.dll -o ffi.dll

.\test.lua

This is output for test (i load only test_cdecl.dll)

Running test
check   1       2
test.lua:27: assertion failed!
stack traceback:
        [C]: in function 'assert'
        F:\E\Projects\lua-ffi\test.lua:27: in function 'check'
        F:\E\Projects\lua-ffi\test.lua:485: in function 'check_align'
        F:\E\Projects\lua-ffi\test.lua:507: in main chunk
        [C]: ?
@jhernancanom
Copy link

jhernancanom commented Sep 8, 2016

Hi, moteus.
How do you complete your proofs for building/compiling this fork on Windows?
My interests: Win32, Lua5.3 .

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants