tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] How I got tcclib_test.c to compile and run using tcc and


From: Adel Amro
Subject: [Tinycc-devel] How I got tcclib_test.c to compile and run using tcc and MSVC2005 (win32)
Date: Wed, 11 Apr 2007 19:14:57 -0700 (PDT)

Hello everyone. I spent the entire day banging my head
with the keyboard trying to figure out how to get
libtcc_test.c to compile correctly under either tcc or
MSVC 2005 Expresse Edition. Finally I did it. This
means I can use tcc now as a scripting library inside
my apps... I mean you can do that, right?

Anyway, here is what I did. Included is a zip file
containing an MSVC++ 2005 EE project along with the
required tcc binaries if you don't want to make your
own.

1. Download tcc source code (I got 0.9.23) and place
it in c:\tcc, then modify the configure file in the
source (c:\tcc\configure) and replace c:\program
files\tcc with c:\tcc.

2. The following message describes steps to build
libtcc.dll. Follow the first step and modify tcc.c
(move the #if !defined(LIBTCC) line down).

http://www.mail-archive.com/address@hidden/msg00337.html

3. Build using MinGW and MSYS. This shouldn't be
troublesome. From MSYS shell, type:
cd c:/tcc
./configure
make

4. From the previous message, follow the "Finally"
part to build libtcc.dll, and then use tiny_impdef.exe
with this dll to make a .def file. Then use the Visual
Studio Command prompt and navigate to the binaries
folder of tcc where the libs are and type:

lib /machine:i386 /def:libtcc.def

This should spit out a libtcc.lib file and an .exp
file. Drop libtcc.lib and libtcc.dll into your project
folder and you're done!

Oh, you will have to modify libtcc_test.c and remove
the printf calls... I still have to figure out how to
get tcc to handle it. Hope this helps. -Love & Peace!

MSVC++ 2005 Express Edition project:
http://www.geocities.com/adelamro2004/files/tccscripting.zip


      Don't be flakey.  Get Yahoo! Mail for Mobile and always stay connected to 
friends.    http://mobile.yahoo.com/mail




reply via email to

[Prev in Thread] Current Thread [Next in Thread]