Folks A colleague with a different machine managed to get tcc to compile on a windows machine. The only obvious difference being that I had MSVC 7.1 installed and he had MSVC 6.
he wrote: I've updated the DLLs and put it on the following URL: http://systems-biology.org/~funa/tccDLLs.zip The archive conatins: * tcc.dll * tccdll.def * libtccdll.a * tccdll.exp * tccdll.lib Here is my compile log how to create DLL version of tinyCC. 1. Compile tinyCC on MinGW - At first, install following packages * MSYS (Minimal SYStem) 1.0.10 * MSYS DTK(Developer Tool Kit) 1.0.1 * MinGW 3.2.0 - Launch MSYS and type as follows: $ tar xvzf tcc-0.9.23.tar.gz $ cd tcc-0.9.23 $ ./configure $ make ... tcc.exe and libtcc.o will be generated. $ gcc -O2 -g -Wall -mpreferred-stack-boundary=2 -march=i386 -falign-functions=0 -fno-strict-aliasing -DLIBTCC -shared -o tcc.dll tcc.c -Wl,--output-def,tccdll.def,--out-implib,libtccdll.a ... tcc.dll, tccdll.def and libtccdll.a will be generated. - Launch command prompt and type as follows: > cd $to_the_tcc_dir$ > lib /machine:i386 /def:tccdll.def ... tccdll.exp and tccdll.lib will be generated. I have used the binaries he generated including one for libtcc to compile a version of libttc_test.c This seems to permantely fail with an error: tcc: file '/c/Program Files/tcc/libtcc1.a' not found I have both put the relevant file in the correct location and tried to pass the location of tcc1 to tcc through the API. Neither worked. yours Andrew > -----Original Message----- > From: > [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] .org] On Behalf Of Dave Dodge > Sent: 16 February 2006 02:21 > To: [email protected] > Cc: Timo Lähde > Subject: Re: [Tinycc-devel] going nuts trying to get / > generate windows binaryof tcc[Scanned] > > On Wed, Feb 15, 2006 at 11:16:53AM -0500, Ben Hinkle wrote: > > On 2/14/06, Andrew Finney <[EMAIL PROTECTED]> wrote: > > > I put all my mingw-related work in directories without spaces (eg > > /c/mingw, /c/tcc etc). I have no idea if that would solve > the problems > > you are seeing but in a unixy world I never trust that all > the tools > > work with directories with spaces. > > It's possible. Back when it was still called Interix, even > Services for Unix didn't work right if you installed it under > Program\ Files. > > > > In file included from tcc.c:51: > > > elf.h:37: error: conflicting types for 'uint32_t' > > > /usr/include/stdint.h:28: error: previous declaration of > 'uint32_t' > > > was here > > Looking at the code, elf.h assumes that when WIN32 is set, > the compiler will not supply some standard C99 types such as uint32_t. > This looks like an attempt to fix a known problem with MSVC's > C99 compliance. MinGW/gcc probably does provide these types, > which is causing a conflict. > > > > tcc.c:1338: warning: implicit declaration of function `_vsnprintf' > > > tcc.c:3374: warning: implicit declaration of function `strtold' > > > tcc.c:4026: warning: implicit declaration of function `_snprintf' > > There's a bunch of things in tcc.c controlled by the WIN32 > setting that would affect these. I notice that _vsnprintf is > a documented (though deprecated) function over at MSDN. A > library suite like MinGW probably supplies a working > vsnprintf and shouldn't use the special > WIN32 settings. > > I suspect the basic problem is that when WIN32 is defined, > the tcc code expects to be compiled with MSVC, not gcc. And > when WIN32 is not defined, tcc expects to be able to use > ucontext, which is a Unix thing that MinGW does not provide. > > If you want to use something like MinGW, Cygwin, or SFU to > compile it, you're probably going to have to either edit the > WIN32 stuff so that the MSVC parts don't kick in; or leave > WIN32 undefined and remove the ucontext dependency. Last > year someone mentioned some success with the second approach, > but had not completely tested it: > > http://lists.gnu.org/archive/html/tinycc-devel/2005-05/msg00019.html > > -Dave Dodge > > > _______________________________________________ > Tinycc-devel mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/tinycc-devel > _______________________________________________ Tinycc-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/tinycc-devel
