|
From: | KHMan |
Subject: | Re: [Tinycc-devel] Newcomer to TCC (and C) with a couple ofquestions.. |
Date: | Fri, 03 Apr 2009 17:15:02 +0800 |
User-agent: | Thunderbird 2.0.0.16 (Windows/20080708) |
Kalle Olavi Niemitalo wrote:
lostgallifreyan <address@hidden> writes:You cite from MSDN... I take it this is because TCC defaults to using MSVCRT? (Or, I read tonight, Kernel32.dll if the program entry point was written to avoid using MSVCRT).The Windows GDI functions are in USER32 and GDI32, not MSVCRT. I cite from MSDN because Microsoft has designed the GDI functions (the first ones perhaps in cooperation with IBM, for OS/2?) and maintains them as part of Windows and gets to decide how they work.
Apart from the links to Win32 help files that grischka has mentioned, a alternative that is a little more up-to-date is the "PlatformSDK_Svr2003R2_rtm" ISO (just do a Google search). It's nicely packaged (self-contained, unlike a lot of other similar downloads) and small (~400MB) compared to the latest SDKs (>1GB). It installs MSDN-style Win32 API documentation that uses a CHM-like browser, good enough if you are not aiming for the latest APIs (it has pre-Win2K info up to WinXP info, but no Vista) and does not want to use MSVC++ Express.
[snip snip]And that means I'm not sure how I should write any GDI oriented code if I want it to compile on Linux. I'd thought the same might apply to both.Ah, you mentioned GDI resources in your original post, so I assumed you were intending the program to run on Windows only. If it needs to run on Linux too, then you could perhaps use Winelib <http://www.winehq.org/site/winelib>, which I believe implements the Windows GDI functions on Linux. Alternatively, use some cross-platform graphics API such as GDK <http://library.gnome.org/devel/gdk/> or SDL <http://www.libsdl.org/> or even OpenGL; at least these three should be usable from C without C++, and thus presumably with TCC. However, if you are already familiar with GDI and have a lot of code that uses it, then switching to a different API may require too much work.
Given the lack of knowledge of the OP in these nitty-gritty details, I would like to suggest that the OP use a standard C/C++ compiler like MinGW on Win32. Say as a beginner, you just want to write an application, so do stick to a compiler that is already well-tested like MinGW (on Win32), or say you want to write an app really quickly, you can use the wxLua that was mentioned earlier (which uses wxWidgets, a good commercial-quality and mature cross-platform widget set, and you develop in C++).
But of course, if the OP has unlimited amounts of time at his disposal, by all means try TCC and help with the development and use of TCC. I am a little worried that the OP might be trying to bite off more than he can chew -- if he is new to C, then I don't think he should be using TCC at all, it's not a production-quality compiler. Stick to the ubiquitous gcc.
-- Cheers, Kein-Hong Man (esq.) Kuala Lumpur, Malaysia
[Prev in Thread] | Current Thread | [Next in Thread] |