[Top][All Lists]
[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 01:31:00 +0200 |
User-agent: |
Thunderbird 1.5.0.10 (Windows/20070221) |
lostgallifreyan wrote:
> (Some explicit DLL-making and linking command examples in TCC's
> "tcc-doc.html" 'Quick Start' section would be nice).
Well, it's in docs/readme.txt.
It seems that while TCC built a DLL from the main Lua library without a
murmur of complaint without the -rdynamic switch, it still needs that switch.
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.
See this section in luaconf.h (Note however that __declspec(dllimport)
has no effect with TCC. It is not needed for functions, only for
data which TCC doesn't support currently)
/*
@@ LUA_API is a mark for all core API functions.
@@ LUALIB_API is a mark for all standard library functions.
** CHANGE them if you need to define those functions in some special way.
** For instance, if you want to create one Windows DLL with the core and
** the libraries, you may want to use the following definition (define
** LUA_BUILD_AS_DLL to get it).
*/
#if defined(LUA_BUILD_AS_DLL)
#if defined(LUA_CORE) || defined(LUA_LIB)
#define LUA_API __declspec(dllexport)
#else
#define LUA_API __declspec(dllimport)
#endif
#else
#define LUA_API extern
#endif
--- grischka
- [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll", lostgallifreyan, 2009/04/02
- Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll", grischka, 2009/04/02
- Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll", lostgallifreyan, 2009/04/02
- Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll", lostgallifreyan, 2009/04/02
- Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll", lostgallifreyan, 2009/04/02
- Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll",
grischka <=
- Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll", lostgallifreyan, 2009/04/02
- Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll", lostgallifreyan, 2009/04/02
- Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll", grischka, 2009/04/03
- Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll", lostgallifreyan, 2009/04/03
- Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll", grischka, 2009/04/04
- Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll", lostgallifreyan, 2009/04/04
- Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll", grischka, 2009/04/06
- Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll", lostgallifreyan, 2009/04/06
- Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll", grischka, 2009/04/06
- Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll", lostgallifreyan, 2009/04/06