tinycc-devel
[Top][All Lists]
Advanced

[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: Ben Combee
Subject: Re: [Tinycc-devel] To compiletcc.c with VC++8.0 succeed, but tcc couldn't find the windows API, why?
Date: Sun, 16 Oct 2005 11:42:59 -0500

TCC uses an ELF binary format for object modules, even on WIndows.  It needs the right WIndows .a library files to link against to build a Win32 EXE, but the ones supplied with VC++ are in COFF format.  It needs the versions from MinGW, I think, to work correctly.  I think those are SYSTEM32 symbols, IIRC.

On 10/15/05, Donald Smith <address@hidden > wrote:
Hi Guys,
 
I am new here.I tried to compile TCC with MS VC++ yesterdy. Now I can only get the tcc.exe to compile but not to link to windows API correctly. I don't know the reason. I did it with VC++ 2005 express beta2. VC8 doesn't support C99 fully. So what I  did  are
 
1. comment out "inline", 
2. change some "switch", the "case" form in the code should be changed
3. the intialization for array changed to traditinal form
4. some others, maybe the directory "/" to "\\"
 
I tried using VC6, but too many it needs changing.  It looks VC6 doesn't support "long long".
 
Compile with VC
   cl /O2 tcc.c
I got the executable file. But when I tried to
  tcc -O2 tcc.c
tcc couldn't find the windows API function, so it should be link problem.
D:\Temp\tccbyvc>tcc tcc.c
tcc: undefined symbol 'GetModuleHandleA'
tcc: undefined symbol 'LoadLibraryA'
tcc: undefined symbol 'GetProcAddress'
tcc: undefined symbol 'GetModuleFileNameA'
 
If anyone knows any hints, please tell me.
 
Thank you very much,
 
Donald

_______________________________________________
Tinycc-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/tinycc-devel





reply via email to

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