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 mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel