grischka <gris...@gmx.de> wrote: (02/04/2009 13:05) > >lostgallifreyan wrote: >> Extra point: >> Actual TCC error is given literally as "tcc: cannot find -lLua.dll" > >Actually there is the "hello_dll" example that you should try >first to see how linking with a DLL works. > >=== > >To clarify: > >TCC (like most other compiler on windows except GCC) cannot link >DLL's directly. With TinyCC you need a .def file created with >the tiny_impdef tool or (if your're using current GIT/CVS version >of TCC) created automatically together with the dll by tcc.exe. > >You then link with foo.def >1) either using "tcc -lfoo ..." (that is if foo.def is in tcc/lib >or in a location that you specify using the -L<libdir> option) >2) or using "tcc foo.def ...", that is the plain full name of the >.def file. >
Link what with it? I'm a newcomer to this, I can't learn from incomplete command lines. I tried this anyway, I built a Lua DLL by using all its C files except Lua.c/Luac.c/Print.c which seemed to be what was required, as I inferred from INSTALL (text file supplied with Lua v5.1.4 source). TCC built a DLL but no .def file. I did think of this though, as I said, I tried tiny_impdef.exe on the DLL to get the .def file but it doesn't get one. I looked for other words on compiling Lua even though I'd managed to do it already. I found this: http://books.google.com/books?id=W9QKpJJCHmIC&pg=PA14&lpg=PA14&dq=lua.dll+tcc&source=bl&ots=-uxa8Ew5pv&sig=mnjzrRG676Y5krhWBX-2Qux6uDE&hl=en&ei=XRrVSduHE-CQjAe7spnwDg&sa=X&oi=book_result&ct=result&resnum=5 which decribes changing some code ina header file, but I didn't need to do this. What it does not decribe is making a DLL of Lua and the EXE that must link to it. I found descriptions for other compilers but not for TCC. If you can give me a complete step by step method that works, I can learn from it, but I doubt I can learn anything meaningful from parts I cannot find any record of having been assembled into a working whole. >In short: It works the same with ".def" as with libraries ".a". > I made a ".a" file too, tried that as well, it didn't work. I need to see a complete example of how to build Lua.dll and Lua.exe with TCC in Windows. I can't do this by Googling and guessing. >And yes, it should work to compile lua with TCC, also when built >as DLL. > >=== > >As to GDI and other windows specific questions as others have already >pointed out, it is best to refer to what MS has to say about directly. > >Tip: > >There is the entire Win32-API in a single .hlp file available on the >LCC-WIN32 site: > >http://www.cs.virginia.edu/~lcc-win32/ >ftp://ftp.cs.virginia.edu/pub/lcc-win32/win32hlp.exe > >(It was also available on the borland site, once). > >It is for Win95 actually, but if you configure your editor that F1 >pops up that help file for the keyword under the cursor then you >have a very convenient setup to go for almost everything you'll >maybe ever want to do with Windows. > >Hope this helps. > >--- grischka > > > >_______________________________________________ >Tinycc-devel mailing list >Tinycc-devel@nongnu.org >http://lists.nongnu.org/mailman/listinfo/tinycc-devel _______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel