lua-users home
lua-l archive

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

On Sat, 24 Nov 2018 14:18:07 +0100
Philippe Verdy <> wrote:

> You'd have the same situation with DLLs on Windows.

Thank you for your example, I have added two __declspec(dllexport)'s
and reproduced your behaviour:

 >cl /c main.c
 >cl /c func1.c
 >cl /c func2.c
 >cl /c myfunc2.c
 >link /dll /out:mylib.dll func1.obj func2.obj
   Creating library mylib.lib and object mylib.exp
 >link /out:main.exe main.obj myfunc2.obj mylib.lib
 Hello from main
         Hello from func1
                 Hello from func2
         Back to func1
 Back to main
                 Hello from myfunc2
 Back to main

Best regards,