Click to See Complete Forum and Search --> : Programming differences between Linux and Windows?


VirtuaKnight
12-10-2002, 08:45 PM
I am in the process of making the transistion from Windows to Linux. It would really help me to know the differences between programming in the two OSes (in C/C++). I assume Perl is the same, since it is parsed by an interpreter program.

Thank you for your time

with.a.twist
12-10-2002, 11:54 PM
perl is the same.

Differences in linux & windows (C/C++) are many. In winblows you probably have an IDE such as Borland or Micro$ofts compiler. These have a nice GUI to setup you linker's and such. Even the older versions of C with microsoft have options like Program -> build. These make your objects, linker's, and exe's.

Under linux (or unix) you have to create a "makefile" to manage the linker & objects. Your best bet is to find a resource on the web and copy the "base file structure" of a makefile. From there you can tweak the makefile to fit your needs.

For instance: If you are compiling a program that accesses an oracle database, you'll end up with a "pre-compiled" version of the code that has the odbc connectors, recordset objects, etc... Some of this code is pretty close to machine language. Its not very humanly readable.

Once you get your environment setup, the rest is in the code.

My suggestion is to start out small. Start with a C program that moves files around, or creates a log of activity. After you have established your development environment, you can then start tweaking the makefile / linkers to use databases, the mouse, standard in, standard out, standard error.

Clear as mud?

binaryDigit
12-11-2002, 09:56 AM
there are IDE's for programming in linux.
Anjuta (http://anjuta.sourceforge.net)
Kdevelop (http://www.kdevelop.org)

i suggest you learn about using make files and getting to know specifics about the os before using an IDE.
after your comfortable with make you can start learning about automake, autoconf, and libtool.
those are the tools an IDE would use in linux.

3m00
12-12-2002, 05:35 PM
Sockets are different, since Unix and Linux use *nix type sockets (whereas windows uses that other standard). File access is also different, but mostly only in the pathnames.

ariell
12-13-2002, 01:18 PM
I, too, switched from Win to Linux. To me it was a way home 'cos I once started with unix in the late eighties.
If you're looking for an IDE you might feel somewhat familar with I suggest dev-c++. It's free stuff, it's not that "fast" but rather handsome. You can download this tool from http://www.bloodshed.net.

best,
ariell.

life is what happens when you plan somethin' different...

majidpics
12-16-2002, 02:39 AM
The windows programming is based onthe callback procedure winmain(),where the message passed by the Windows operationg system is identified in switch case and then processed.
To study the windows programming, check out "Windows Programming by Charles Petzold".

SourceCode
12-16-2002, 04:17 PM
I highly recommend anjuta. It indents flawlessly, even better than Dev C++ and microsofts VC++. Less time spent hitting tab,backspace etc is great!

JKlebs9225
12-17-2002, 02:23 PM
before you download anjunta, make sure you have GNOME installed, because last time I read about it, it only worked with that desktop environment