Jos Timanta Tarigan wrote:
> Im a little bit confused here. Isn't the cross-platform-ability depends on 
> the compiler (eg: gcc, borland) ?
>   

Yes and no. Compilers may have implementation-specific extensions. The 
vast majority of compilers do. However, in general, these are related to 
relaxing code standards or enabling extensions to syntax, not adding 
functions or classes, which would be handled by a library.

> Here is the deal, I have an openGL assignment that may run only on Windows or 
> linux. If I am able to compile(build) and run my openGL program on my xcode, 
> can I run it on linux too? (without any no more effort than copy and paste, 
> like in java)
>   

OpenGL is a cross-platform library. If you write to both the C/C++ and 
OpenGL standards, then any standards-compliant implementation will 
compile and run your code fine.

What I was getting as is that when you write a 3D application, there is 
more to it than just OpenGL or whatever 3D library you use. You will 
likely need hooks into the OS to handle other tasks (e.g. configuration 
settings, temp file management), and a platform-independent toolkit can 
help.

For example, Qt is, on the surface, a GUI framework that allows 
developers to create windows and widgets. You write once, and can 
compile on any supported platform (Windows and Linux are both supported) 
and get the native LAF (look and feel). It also supports abstractions of 
many other commonly requested application features. For example, it has 
the ability to use a single client API to connect both to the Windows 
Registry as well as flat files. This means you can write one 
configuration piece that will work with both platforms.

Unless you are writing a simple program for an assignment (e.g. 
implement this algorithm), you will want to use a toolkit of some sort. 
It automates many tasks and frees you of hundreds or even thousands of 
hours of labor.

-- 
John Gaughan


Reply via email to