tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll"


From: lostgallifreyan
Subject: Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll"
Date: Fri, 3 Apr 2009 01:33:21 +0100

grischka <address@hidden> wrote:
(03/04/2009 00:31)

>That is because you missed the "-D LUA_BUILD_AS_DLL" option which
>is needed for building lua.dll and has the effect that the ymbols
>declared as "LUA_API" are exported which is how it should be.
>
>The "-rdynamic" option simply tells TCC to export just all symbols,
>which then works too, of course.
>

Ok, I see that changing
    C:\tcc\tcc.exe -I"%P%\src" -o"%P%\bin\lua.dll" -shared -rdynamic %P%\src\*.c
to
    C:\tcc\tcc.exe -I"%P%\src" -o"%P%\bin\lua.dll" -shared -DLUA_BUILD_AS_DLL 
%P%\src\*.c
..works as it should without changing the source itself, for Lua.exe anyway.

If I also try building Luac.exe I get these errors:

tcc: undefined symbol 'luaF_newproto'
tcc: undefined symbol 'luaD_growstack'
tcc: undefined symbol 'luaS_newlstr'
tcc: undefined symbol 'luaM_realloc_'
tcc: undefined symbol 'luaM_toobig'
tcc: undefined symbol 'luaU_print'
tcc: undefined symbol 'luaU_dump'

Again, as the -rdynamic switch produced a fuller .def file that allowed both 
EXE's to build and run, it looks like emphasizing its use to newcomers is wise, 
because otherwise there is too much emphasis on details that might best be 
avoided when code is meant to compile as supplied with minimal end user input. 
The slight increase in DLL size is a small price to pay for easy and 
convenience if all we want to do is build source as supplied, using a general 
set of commands to TCC without having to know what the source does.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]