[Top][All Lists]

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

Re: [Tinycc-devel] To compiletcc.c with VC++8.0 succeed, but tcc couldn'

From: PerfectDark
Subject: Re: [Tinycc-devel] To compiletcc.c with VC++8.0 succeed, but tcc couldn't find the windows API, why?
Date: Mon, 17 Oct 2005 00:23:32 +0400

You wrote 16 oct 2005 , 1:54:05:

DS> Hi Guys,

DS> �

DS> I am new here.I tried to compile TCC with MS VC++ 
DS> yesterdy. Now I can only get the tcc.exe to compile but not to link to 
DS> API correctly. I don't know the reason. I did it with VC++ 2005 express 
DS> VC8 doesn't support�C99 fully. So what�I��did 
DS> �are

DS> �

DS> 1. comment out "inline",�

DS> 2. change some "switch", the "case" form in the 
DS> code should be changed

DS> 3. the intialization for array�changed to 
DS> traditinal form

DS> 4. some others, maybe the directory "/" to 
DS> "\\"

DS> �

DS> I tried using VC6, but too many�it needs 
DS> changing.��It looks VC6 doesn't support "long long".

DS> �

DS> Compile with VC

DS> �� cl /O2 tcc.c

DS> I got the executable file. But when�I tried 
DS> to

DS> � tcc -O2 tcc.c

DS> tcc couldn't find the�windows API function, so 
DS> it should be link problem.

D:\Temp\tccbyvc>>tcc tcc.c
DS> tcc: undefined 
DS> symbol 'GetModuleHandleA'
DS> tcc: undefined symbol 'LoadLibraryA'
DS> tcc: 
DS> undefined symbol 'GetProcAddress'
DS> tcc: undefined symbol 
DS> 'GetModuleFileNameA'

DS> �

DS> If�anyone knows�any hints, please tell 
DS> me. 

DS> �

DS> Thank you very much,

DS> �

DS> Donald

Try compile it with kernel32.def and msvcrt.def (because tcc'll need
stuff like fopen, strcpy...). You'll get that defs
when using tiny_impdef.
I compiled tcc by tcc by following not good way:

./tcc -o"tcc_new.exe" -I"win32/include" -I"win32/include/winapi" tcc.c 
obj/crt1.o obj/libtcc1.o
obj/chkstk.o def/kernel32.def

Of course, you must at first get these objs and defs.

Greetings from Russia,

reply via email to

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