Quote:
|
Originally Posted by Codein
It depends. C, as I'm led to believe, has no problems in cross-platform compilation, but if you were to use C++, then MIGHT have to do some porting.
|
This is mostly due to either people not writing standard C++ and relying on unportable details of their system (data type sizes, alignment, stuff that is not guaranteed to compile/run but is supported as an extension, ...), or using a compiler that does not compile C++ but only something that looks rather close to it (most compilers, actually, but notable older versions of MSVC++).
Both of these can be avoided with some effort. gcc is available on a lot of platforms, and g++ should work there too. I suppose the biggest problem is people relying on unportable libraries, avoiding which might require a lot more effort, especially if you try to port existing code which heavily relies on this library.
C++, as a language, is not less portable than C by anything that amateurs like us would notice.