ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Difference between programming for Linux and Windows?

(1/4) > >>

zridling:
I can't code my name, but I need to be informed: What is the difference between programming for Linux and Windows? Especially the same program. I ran a second Linux box for years, but never made the full switch because several of my most used apps throughout the day aren't coded for Linux. Is it difficult? Do you have to go to 'Linux' school? About the best article I could find was Biculturalism by Joel Spolsky:

What are the cultural differences between Unix and Windows programmers? There are many details and subtleties, but for the most part it comes down to one thing: Unix culture values code which is useful to other programmers, while Windows culture values code which is useful to non-programmers.... This is, of course, a major simplification, but really, that's the big difference: are we programming for programmers or end users? Everything else is commentary.

Josh:
win32 style: CreateProcess( <insert 58 million arguments to give the programmer the illusion he has alot of control );

unix style: fork();

CodeTRUCKER:
@Josh  -  Solid!  :Thmbsup:

@Zaine  -  The architecture of programming itself is really very simple. Read >> Process >> Write.  The only difference is really just syntax, so pick your best (most comfortable) language and have at it and see what happens.  Does that help?

zridling:
Now see Farmsteader, that's just it: I don't know. I don't even know enough about programming to ask the question in a specific way, other than the example of writing the same program for each OS platform.

tinjaw:
Maybe a simple diagram will help frame the question better.

application
---------------------------
API Layer
---------------------------
operating system
---------------------------
drivers
---------------------------
hardware

So when you write a program you have to go through the API (Application Programming Interface) layer. So, even though you use the same programming language (say C++) and eventually end up compiling down to the same machine level code for the CPU (say x86) you get there via different paths.

A concrete example would be writing a program to simply open a window/frame to put your applications GUI (Graphical User Interface) into. The code to do that is different depending on what operating system (and what windowing platform) you are using.

It's a little more complicated than that, but that should provide a good basis for an understanding.

Navigation

[0] Message Index

[#] Next page

Go to full version