[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'
Re: [Tinycc-devel] To compiletcc.c with VC++8.0 succeed, but tcc couldn't find the windows API, why?
Mon, 17 Oct 2005 00:23:32 +0400
You wrote 16 oct 2005 , 1:54:05:
DS> Hi Guys,
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> 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> I tried using VC6, but too many�it needs
DS> changing.��It looks VC6 doesn't support "long long".
DS> Compile with VC
DS> �� cl /O2 tcc.c
DS> I got the executable file. But when�I tried
DS> � tcc -O2 tcc.c
DS> tcc couldn't find the�windows API function, so
DS> it should be link problem.
DS> tcc: undefined
DS> symbol 'GetModuleHandleA'
DS> tcc: undefined symbol 'LoadLibraryA'
DS> undefined symbol 'GetProcAddress'
DS> tcc: undefined symbol
DS> If�anyone knows�any hints, please tell
DS> Thank you very much,
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
Of course, you must at first get these objs and defs.
Greetings from Russia,