Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

TCC : Tiny C Compiler


  • Please log in to reply
19 replies to this topic
Tuncay
  • Members
  • 1945 posts
  • Last active: Feb 08 2015 03:49 PM
  • Joined: 07 Nov 2006
Don`t know about doskey much. I am using the batch file as the shbang line of my tcc-scripts on my USB-Stick.

Hecat
  • Guests
  • Last active:
  • Joined: --
>> I have managed to compile a test DLL with TCC, but it wants a WinMain, it doesn't accept a DllMain...

I have the same problem here, i would like a DLL instead of en EXE.

Lostgallifreyan
  • Guests
  • Last active:
  • Joined: --
In the spirit of being a new visitor resurrecting old threads, I strike again. >:)

I just started using TCC, and learned a few nice things. One is that with the newest to date, v0.9.24, you can make a DLL (at least, using Lua as example) with "tcc -shared -rdynamic *.c" where *.c is all c files except Lua.c, and Luac.c (hide them or change ext), and none of the rest have either WinMain or DllMain. The luaconf.h file gives a proper method for exporting the DLL linking stuff but using -rdynamic makes it export all, so in absense of knowing things specific to the source, it might well apply generally to other programs. Then I compiled Lua.c linking it with the .def file generated when I made the DLL. (Likewise compiling Luac.c also).

Which leads on to other nice stuff, like Lua scripts translated to C by the Lua scripted "Lua2c" can compile the same way, making very tiny executables that depend on that same DLL. I'll leave how nice that is to your imaginations.

Sorry this isn't related to AutoHotKey, it's just that at least a couple of people in this thread had posted in the other one I posted in earlier tonight, and they're into Lua, apparently. Google has a strange knack of throwing up incidental connections, and we might well carry on meeting like this. >:)

m0m0
  • Guests
  • Last active:
  • Joined: --
Can you tell me the way to install TCC on win 7 32-bit

Lostgallifreyan
  • Guests
  • Last active:
  • Joined: --
I don't know, but 32 bits is 32 bits, so you won't run into the difficulties people may have when using TCC for 64 bit compiles, which seem to be in active but unfinished development.

Apart from various permissions and other stuff you have to negotiate in later OS's, it should work the same way as in W98. Just unpack a binary of it where you want it, if you have one, or compile it from source with GCC. (Supplied with DevC++). It's a few years since I did that so I can't remember the details, but the fact that I could do it suggests that it's one of the easier compiles. No need to mess with make-and-bake files and all, just use the batch script that comes with it. It's built in ANSI C so not only should it compile on anything, it ought to run on pretty much anything it will compile on too.