|
From: | Tom Hartnett |
Subject: | Re: [Tinycc-devel] Compiling tcc under Windows using tcc? |
Date: | Thu, 01 Dec 2011 17:14:27 -0500 |
User-agent: | Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
On 11/30/2011 12:44 AM, Xianwen Chen wrote:
Hi,Xianwen, I use TCC (win32) to compile TCC "all the time" under Cygwin, MinGW, *AND* Windows ("DOS"). But first, some particulars about my environment: 1. I run Window XP and/or Windows 7. 2. I am really only interested in "console" apps (i.e., main(argc, argv) stuff). (I also do a lot of embedded stuff and in that case I have my own version of CRT1 and there are no DLLs involved at all.) 3. When I compile TCC under MinGW, Cygwin, or ** cmd.exe ** (i.e., a "DOS" window), it works.. and the only DLLs it picks up are MSVCRT.DLL and KERNEL32.DLL, so it pretty much works in any (Windows) environment. 4. I also organized the directories slightly differently than the "standard" 0.9.25 distribution (mostly, I have SRC, LIB, and INCLUDE subdirectories, instead of having the source in the same directory and/or the parent directory of where I'm building the compiler. 5. I use a makefile and/or a bash script for building under MinGW or Cygwin, but in "DOS" I use a simple batch file (below). 6. I modified the source code so that the "TCC_VERSION" is a string that includes the TCC_VERSION of the compiler that I used to "compile the compiler" (a TCC "family tree"). With all those caveats.. here is the batch script I use to build TCC. (I have the 0.9.25 distribution copy of TCC in c:\tcc\win32.) c:\tcc\win32\tcc -DTCC_VERSION="\"0.9.25 (tmp)\"" -o tcc.exe src\tcc.cI don't expect this to be directly useful to you, except to say that (a) your though about using TCC to build TCC *without* Cygwin or MinGW is right on the money, and (b) it's fairly simple. If any of this doesn't make sense, just shoot me a reply. Regards, Tom |
[Prev in Thread] | Current Thread | [Next in Thread] |