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: grischka
Subject: Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll"
Date: Fri, 03 Apr 2009 15:30:12 +0200
User-agent: Thunderbird 1.5.0.10 (Windows/20070221)

lostgallifreyan wrote:
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.

Well see, Lua is a piece of code with some tens of thousands of lines
where each word is well designed and meaningful with the final binary
product.  So if some symbols are exported and others are not then
this is likely not meant to fool newcomers but to expose a well
defined interface for those who use this scripting extension language
in their (often commercial) programs.

Now you are right that we often don't want to know what all the details
mean but the more it is advisable then to stay close to the decisions
of the author.  Which in this case obviously (and as we can confirm by
look into the makefile) includes that luac.exe is not build with the DLL.

Still, maybe -rdynamic needs more explanation with TCC. So please feel
free to suggest some addition to the docs, say, one short sentence,
placed to your choice ;)

Thanks,

--- grischka





reply via email to

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