tinycc-devel
[Top][All Lists]
Advanced

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

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


From: lostgallifreyan
Subject: [Tinycc-devel] TCC:cannot find -l"xyz.dll"
Date: Thu, 2 Apr 2009 05:59:50 +0100

Hello. I'm trying to build an executable linked to a DLL in W98. TCC keeps 
telling me the DLL can't be found. I Google for [tcc: cannot find] and see 
others asking for help with this, and none of the answers they're getting work 
for me. I got the impression this is a persistent problem, too, over several 
versions.

First, what I have acheived:

@ECHO OFF
SET P=C:\lua-5.1.4\src
SET LUA="%P%\lapi.c" ... (Remaining Lua C library filenames omitted for brevity)
C:\tcc\tcc.exe -I"%P%" %LUA% "%P%\Lua.c"
REM The last quoted path is to a Lua script ported to C by Lua2c.lua, OR to 
Lua.c in this case of building Lua itself.

This works fine, it builds either the standard Lua.exe v5.1.4. Or as stated, if 
I replace Lua.c with any of my scripts (converted to C by the Lua-based Lua2c) 
it builds a working executable that works in W98 or WXP. This executable 
contains the entire Lua library build too, of course... That's what I need to 
avoid, as I don't want every script conversion to contain it, even though UPX 
makes its size modest enough...

So I tried a change to the batch line calling TCC:
C:\tcc\tcc.exe -I"%P%" -shared %LUA%

This appears good too, it built for me what looks like a Lua.dll, it even gave 
it the filename extension 'dll'... helpful. Whether it IS good I don't know, 
because I'm not sure if TCC really cannot find this DLL, or whether it can, but 
not in a form it accepts, for all I know TCC might report either condition the 
same way, as to keep a compiler small, no doubt error messages can't be too 
many and varied.

Things I've tried:
Making sure I observed case sensitivity in any paths.
Adding a directory "lib" to the root of C:\ and putting the DLL in it.
Putting the DLL in TCC's own lib directory.
C:\tcc\tcc.exe -I"%P%" -L"C:\lib" -l"Lua.dll" "%P%\Lua.c"
C:\tcc\tcc.exe -I"%P%" -L"C:\tcc\lib" -l"Lua.dll" "%P%\Lua.c"
Omitting quotes and changing backslashes to forward slashes in the above 
example.
Various other likely meaningless or inappropriate things such as adding -static 
or -rdynamic just to see what if anything happens.
Using tiny_impdef.exe on Lua.dll with intent to put a .def file in TCC's "lib" 
dir with the others, but Lua.dll won't yield one.

TCC is extremely persistent, it can't find this DLL, and if Google is anything 
to go by the problem is bigger than I am, so I really need help here. Please 
bear in mind that others have asked, and I haven't seen anyone yet say "yes, 
that worked". Some people found no answer at all.







reply via email to

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