On Fri, Aug 8, 2008 at 7:44 AM, Jos Timanta Tarigan <[EMAIL PROTECTED]> wrote: > Im a little bit confused here. Isn't the cross-platform-ability depends on > the compiler (eg: gcc, borland) ?
No, not really. Cross-platform means that your code can be compiled by compilers on multiple platforms. This altogether depends on the libraries you use. For example, if you only use the features that are defined in the C++ standard (= standard libraries), then every compiler that is standard-compliant will be able to compile your code, and that means a LOT of platforms. > > 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) Well, it's been many years since I worked with OpenGL, but if you don't use Windows or Linux-specific libraries, then your code will be cross-platform. I vaguely remember that there was some OpenGL support library (maybe GLUT?) that did this platform-independent initialization of the OpenGL viewports (that part is platform-specific without that support library), so you could compile your code with any compiler supporting OpenGL (gcc, Visual C++, etc). The OpenGL calls themselves are platform-independent, it was only the initialization that had some platform specific code. But this all was about 7 years ago, so this info might be way outdated. -- Tamas Marki
