PDF Editor in Ubuntu
H.S.
hs.samix at gmail.com
Fri May 29 21:22:39 UTC 2009
Dotan Cohen wrote:
>> C langage is the same on Windows and Linux ;-) If you have spent 3
>> months developping a filtering algorythm for Photoshop in C, the same
>> code can be used on Windows or Mac or anything. It's what high-level
>> languages are for after all, mostly.
>>
>
> Except when they use platform-dependant libraries or OS functions.
> Even my one-semester course in C was enough to convince me that coding
> on my then-Fedora machine was not producing the code that they wanted
> in Turbo-C, and that the two were incompatible. In an ideal world, C
> would be C and the code would compile where you had a C compiler.
It is, as long as you stick with the language's standard. This way,
libraries can be compiled on different platforms. All this, of course,
does not help if the library creator does not keep this in mind or if
they do not release the source code to let users compile it on various
platforms.
BTW, who does "they" refer to here (who want your code in Turbo-C)?
Further, I would be very surprised if ANSI compliant code does not
compile in TC compiler. But using Turbo-C's custom libraries is
definitely going to be a problem. Why use them at all? The very first
example programs I created were in TC. But using different compilers
then (in Linux as well as in Windows) taught me the lesson to avoid
proprietary libraries (special the test graphics ones in TC) if I wanted
portability.
> Unfortunately, it doesn't wuite work that way in the real world.
It depends how you interpret "real" here. Open source projects also
real, yet they can be platform independent. It is not difficult to
achieve this with standard C and console applications. Some work is
needed to get the same thing in GUI applications as well.
--
Please reply to this list only. I read this list on its corresponding
newsgroup on gmane.org. Replies sent to my email address are just
filtered to a folder in my mailbox and get periodically deleted without
ever having been read.
More information about the ubuntu-users
mailing list