> I just checked and Corel/Debian Linux come with gcc 2.7.2.3 and g++
> (which is the name they give to egcs) 2.91.66. I checked the Debian web
> site and 2.95 is not yet in the "stable" area, it is marked as frozen.
> For now, I'll stick with g++ 2.91.66 and check weekly to see when 2.95
> makes it to the stable state. I suspect that there would probably not
> be any problems using 2.95 as it stands but I'd rather be safe then
> sorry :-)
I knew it was 2.9something, I just wasn't running it to check it. As someone else
mentioned, 2.95 is stable and is safe to use, but 2.91.66 may also be sufficient
for your needs.
Actually, g++ is not the new name for egcs. egcs essentially replaced GCC and is
now called GCC. So GCC is the new name for egcs. g++ is a wrapper around GCC that
sets it up for compilation of C++ code (it calls gcc with the appropriate set of
command line arguments). It really is an integral part of GCC. It may be,
though, that Corel decided to make g++ be a wrapper around egcc (GCC 2.91.66),
which was probably a wise choice, since GCC 2.91.66 handles newer C++ constructs
better. The only real difference between compiling a program using egcc and g++
(in this case) is that g++ will treat the source file as a C++ file, even if it is
only a C file, whereas egcc by default will look at the file's extension and
determine whether to treat it as a C or a C++ file. A file ending in ".c" will be
treated as a C file, and a file ending in ".C", ".cpp", ".cxx", etc., will be
treated as a C++ file. One thing to note is that if you are mixing C and C++
source files, it will make your life easier to compile them all with g++ to avoid
name mangling problems. Otherwise, I'm not sure there is any real benefit to using
g++ instead of egcc.
Quote:> As you state, it is better for me to just look at the GUI libraries
> (such as Qt and GTK+) and decide which one I like best and then use it.
> I don't need to worry or care too much about which Windows manager is
> actually running, I believe (for example, I'm running under kdm which is
> the KDE manager, unless I'm mistaken).
Almost. kdm is the K display manager which controls X login sessions. kdm is
KDE's version of xdm (X Display Manager). You can get some info about xdm to get
an idea of what its job is by typing "man xdm" at the command prompt. kwm is the
window manager used by KDE. It's not a big deal, but there is a difference between
the jobs of kdm and kwm. It won't affect your work any, but it still may be nice
for you to understand it.
Quote:> To try to compare a bit with Win32, I would guess that KDE is closer to
> what Explorer is, GTK+ and the likes might be compared to MFC, and X11
> would be the Win32 APIs and the underlying Windows operating system (os
> may not be the right word here <g>).
You're getting closer. I would say KDE is more like the whole Windows desktop
including the task bar, start menu, etc. For me, Explorer is just a fancy file
manager. kfm does much of what Explorer does. You're right that GTK+ or Qt is
like MFC, and X11 is more like the graphics parts of the Win32 API. X is totally
separate from the operating system, so the analogy kind of stops there. Under
windows, the windowing system is integrated into the OS, whereas X is a separate
process that runs on top of the OS just like any other process. It just happens
that this one is graphical.
Quote:> For people to be able to run my application regardless of which Windows
> manager (KDE, GNOME, etc), they would need to have the libs for
> whichever GUI toolkit I decide to use installed on their copy of Linux
> (or maybe I can even statically link these?). Note that I do not plan
> on distributing the source code for my application: does this mean that
> I have to recompile it on different flavors of Linux or will the same
> compiled executable run on all versions of Linux using the same
> processor (aka Intel)?
It's possible you will need to recompile your program for different Linux
distributions, though you may not need to, given that more recent distributions
(aside from Debian, as far as I know) use most of the recent libraries. At the
least, you will need to let the user know what libraries are required by the
application, so they can update their system if necessary. You will also want to
consider how it is packaged. You will probably want to produce an RPM package, a
Debian package, and perhaps a gzipped tar file.
I think the biggest problem you may run into will be with the C and C++ library
versions. Some systems are still using the libc5 C library, whereas most new ones
are using glibc2 (or libc6). There are not compatible, so you will either need to
compile your program for both and create a package for each, or simply decide that
you will use one or the other and let the user know which is required. Also, since
you will be using "standard" C++, you will need to take into account the C++
library used. Since you are compiling with gcc 2.91.66, you will be using
libstdc++.so.2.9. Many systems with a recent but not completely current
distribution will have libstdc++.so.2.8. The two can coexist peacefully, so it's
not a big deal, but the user will need to know which library is required, so they
can install it if necessary.
Quote:> I'm particularly interested in both GTK+ and Lesstif
> (both being free and I have Lesstif already installed on my Linux, I
> believe). I'll need to find out the diff between Lesstif and Motif (and
> whether I can write a Motif app but not require users of it to buy Motif
> or not).
Lesstif is an opensource project whose goal is to create a widget library that is
source compatible with Motif 1.2. In other words, Lesstif is designed to be a
drop-in replacement for Motif. So, if you use Lesstif, no, the user won't need to
purchase a copy of Motif.
There are commercial GUI builders for Motif (or in this case, Lesstif) also.
Lyle Taylor