Page 1 of 1

Linux versus Windows

Posted: Fri Oct 06, 2006 3:05 pm
by alex.barylski
Yikes...compiling a program under Linux is more complcaited than under Windows...Everything is so different...Linux has almost what appears to be "built-in" support for compilation.../usr/includes/ and lib directories as well...

This is relly foreign to me...Windows...when you download a IDE or even a compiler like Borland...and you install....you typically select the library paths, etc and need to specify where they are eith in make files or command line...the gcc compilers seem to assume default libraries/includes where I indicated abouve...of course you can also directly specify new directories...but jesus...what a change...

My question, does anyone have any resources or articles, etc (basically what I'm learning about the discrepancies) for Windows developers switching over to Linux???

It would almost be easier to have never learned Windows development in the first place as much of this is leading to confusion...

For instance, glibc is the GNU relplacement for crt??? Obviously clear once you know it, but figuring that out required me to read about 100 pages of various articles...

The OS architecture between Linux and Windows is quite different as well...

Linux didn't support true "multi-threading" until recently...and the Windows API is often titled as the replacement for CRT...I don't wxWdiegst, etc are attempting to replace glibc however, so for many operations you would use the glibc...

Makes sense, but confusing as hell...so again...anyone know of any articles, etc which walk a Windows developer through the process of building his first Gtk+ wxWidgets application from a Linux perspective???

Cheers :)

Re: Linux versus Windows

Posted: Fri Oct 06, 2006 4:40 pm
by timvw
Hockey wrote:Yikes...compiling a program under Linux is more complcaited than under Windows...Everything is so different...Linux has almost what appears to be "built-in" support for compilation.../usr/includes/ and lib directories as well...

This is relly foreign to me...Windows...when you download a IDE or even a compiler like Borland...and you install....you typically select the library paths, etc and need to specify where they are eith in make files or command line...the gcc compilers seem to assume default libraries/includes where I indicated abouve...of course you can also directly specify new directories...but jesus...what a change...
I presume that most people that want a gui for c++ development use kdevelop (but it's targetted to QT instead of GTK or WxWindows)

Posted: Fri Oct 06, 2006 4:43 pm
by nickvd
More Complicated?

How so? Assuming you have all the deps, it's usually as simple as:

Code: Select all

# ./configure && make && sudo make install
the &&'s are just like in programming, run ./configure AND IF NO PROBLEMS run make... and so on...

Now, if you're talking about compiling something you wrote, or something that doesn't come with the makefiles/configure script, then you may just be right...

Posted: Fri Oct 06, 2006 4:52 pm
by timvw
You'll see the pain as soon as you start writing your own configure scripts, makefiles, etc...

(if it was all easy then there wouldn't be tools like autoconf and automake etc)

Posted: Fri Oct 06, 2006 8:02 pm
by alex.barylski
Well dependancies are only a PITA right now because of my lack of experience in downloading them...installing them, etc...

wxWidgets for instance on Ubuntu...I tried Synaptic...couldn't find em. Then I found an article explainging how to add the package to sources.list file and away I went...

I First tried apt-get upgrade, etc...and everything seemed to install correctly, but when I searched for the files (wx.h for instance) I found nothing...so I wasn't sure how the heck was going on...

I fired up synaptic and it requested updating it's DB so I said OK...it did and voila...I found the wxWidgets but couldn't figure out which to install...

I lost interest and instead downloaded the tar ball...read the readme, etc...and determined it was best to build from scratch...

Building is easy I agree...it's a simple matter of entering commands as shown and letting the computer go...but when you new and nothing is as it supposed to be, this complicates things...

For instance, I was sure I installed G++ using synaptic, but apparently it was named g++-4.0 and *not* g++ so all makes and configures, etc choked and didn't give me the slightest clue it was because g++ being named incorrectly...

By trial and error and reading log files I determined maybe that was it...so I renamed g++-4.0 to g++ and voila!!!

Everything built successfully so far...now I just need to write up a quick wxWidgets application and makes sure all library dependancies, etc are met and I can *finally* start working on my IDE...

It's still a PITA but as my knowledge grows in terms of Linux use and it's different ways of doing things than Windows...life will only get easier...I'm just right now...growing more frustrated than happy :P

Compiling something I wrote...I wish...I'm sure I won't have nearly as many problems as I am right now because of misnamed files, etc...atleast I know a compiler quite well...this is only about my second or third week using Linux...so...ugggggh...I'm getting tired of mis leading docs, which aren't misleading, but my system seems to setup everything slightly incorrectly...

Posted: Tue Oct 10, 2006 9:55 am
by pedrotuga
i am another begginer on linux, but i should say that despite the apearence linux is is much more user friendly in the eyes of a programmer.
Like, a lot of software ( libraries, compilers, etc ) were designed to run on a unix-line operative system then later ported to windows, where they actually dont work so well and spread all around in a messy way taking away from you all the control you would have over basicaly everything.

Linux was a relief for me as i can make anything work in minutes without headaches. And everything is there so i can see it instead of strange temporary and proprietary files that not even the administrator has rights on.

anyway, lets get to what matters

First of all, enable the multiverse and universe repositories, they dont came enable by default as the licences of the software hey contain do not follow ubuntu licence policy. Read this to know how to enable them.

then update apt or synaptic or whatever packet manager you use and try again. If that doesnt work...mmm dunno but it looks pretty akward.
A guy in my laboratory uses kdepeloper to develop GUI aplications, i remember that in the "new project wizard" he could pick one among qt, gtk, wxwidgets, etc etc. i dunno if that comes with te standard instalation of kdeveloper, i guess it does.

hope this helped some

i never understood this window libraries thing, like is gnome gtk based? whats the problem of running kdeveloper on gnome?
can i make konqueror my default file browser on gnome?

Posted: Sat Oct 14, 2006 7:30 am
by AngusL
pedrotuga wrote:i never understood this window libraries thing, like is gnome gtk based? whats the problem of running kdeveloper on gnome?
can i make konqueror my default file browser on gnome?
GNOME and KDE are two desktop environments. They run on top of the X Window System which is currently at protocol version X11. The specific implementation varies, but is probably the X.org version. X.org can display windows by itself, but is ugly as sin and not awfully functional (which is fine, since that's not really how it's meant to be used).

GTK+ is the library of widgets etc for GNOME, and Qt is the equivelant for KDE. If you install GNOME and KDE side by side, then you can run KDELibs programs under GNOME and vice versa. Normally though, you'll just choose one (particularly given the length of the compile if you're running Gentoo ^_^ (note: I use Gentoo and love it - not bashing it!)). KDE also has the KDELibs which are a variety of libraries for a variety of use cases that are aimed at KDE users, but again will work under GNOME.