Windoze programming to linux programming [Archive] - C Board

PDA

View Full Version : Windoze programming to linux programming


windoze victim
11-27-2002, 07:06 PM
I am starting to teach myself C++ with bloodshed, and while i am running windoze, i want to switch to linux.

How is the similarity of C++ programming between the two systems?

Thanks for your help.

Hammer
11-27-2002, 07:21 PM
The c++ language itself is platform independant, however, there are many extensions to it that are platform dependant. As you're starting out, stick to the basics of the language, and you'll find it to be portable.

Either way though, it's good to know both sides.

Have fun :)

ygfperson
11-27-2002, 09:40 PM
a lot of it depends on what you're going to do. there are only minor variations between windows and linux if you ignore the GUI. while the windows GUI is very much developed, and has a ton of support, linux has XFree86, and some layers on top of that to abstract from (like kde or gnome).

however, gtk and qt are relatively cross-platform compatable with windows and linux. if you want portability, try one of these API's.

Jaguar
11-29-2002, 11:25 AM
there are only minor variations between windows and linux if you ignore the GUI.
At least there is an incompatible header conio.h on Windows/DOS and curses.h on Linux/Unix.

unixOZ
11-29-2002, 09:08 PM
Since C++ is platform independant, there really isent any difference when programming in Win32 or UNIX (except for maybe a few functions).
But when you start using APIs, you will notice that the difference is rather large (say Visual C++ has nothing to do with C++ and UNIX programming (sockets, special functions, GUI, etc)

Lynux-Penguin
12-05-2002, 02:02 AM
wait
there is a difference

the way the headerfiles and types are defined IS PLATFORM DEPENDENT
you can not tell me that windows and linux's iostreams are identical

basically you wont know a difference until you do platform dependent programming like networking or kernel programming and stuff. I noticed the difference when trying to define new streams.

A good portion of code out there is platform dependent, the only way to run other platform's code on the platform you use is an emulator or a dual boot.

One last thing, Linux's compiler is free
Window's compiler costs at least $80 (for a decent compiler)

gcc -o myfile.lxe myprogram.c
or
g++ -o myfile.lxe myprogram.cpp

note lxe is the executable extension on my Linux edition
lxe = lynux executable
it is a useful thing I recomend implementing it everywhere.

-luke