Advertisement

C++ and Linux

Started by April 12, 2002 07:31 AM
10 comments, last by cneff78 22 years, 9 months ago
Which is the best complier for Linux? Where can I learn more about Linux development? Is there an API similar to Win32?
CodeMonkey
quote: Original post by cneff78
Which is the best complier for Linux?

GCC is pretty much the standard.
quote: Original post by cneff78
Is there an API similar to Win32?

Yes and no. The POSIX standard specifies a number of functions that must exist in unixes, but it handles mainly system level things. The next step up is X''s library, XLib. It handles somewhat low-level graphics. To do GUI''s there are two big choices, GTK+ and Qt.

Advertisement
Speaking of compilers, has anyone used or seen any reviews for Metrowerks CodeWarrior for Linux? I''ve heard good things for its M$ compilers, but nothing about Linux.
The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. We have grasped the mystery of the atom and rejected the Sermon on the Mount." - General Omar Bradley
From my 5 years of coding games on Linux, I strongly
recommend egcs (I''m currently using egcs-2.91.66).

The reason for this is that its optimizations appear
to be better than gcc and has fewer internal bugs.
Now this is from my own observed behavior, others
may vary. But egcs has been able to compile code
where gcc failed to.
Tara Milana - WP Entertainmenthttp://wolfpack.twu.net/Comp graphics artist and programmer.
Uh, I thought that egcs was the old name for the c part of gcc? (gcc = gnu compiler collection)

/Mikael
quote: Original post by mikael_j
Uh, I thought that egcs was the old name for the c part of gcc? (gcc = gnu compiler collection)

/Mikael


Yeah, me too. Yep, GCC is the standard, and it is quite nice of a compiler, I even use it on Windows (Mingw32). If you like C++ and want the closest thing to the Win32 API, QT is it! It''s another very nice toolkit, many people like it more than MFC, and the documentation is great! A few nice IDE''s are KDevelop (KDE) and Anjuta (GNOME). Check all of that out.
"I am governed by none other than the Laws of the Universe."
Advertisement
From http://www.nanotech.wisc.edu/~khan/software/gnu-win32/x86-win32-ports.html

"EGCS was an experimental step in the development of GCC, the GNU C compiler. Consult the egcs web site for more information. As of April, 1999 FSF GCC project has merged with EGCS and the result is gcc-2.95 release on July 31, 1999. The project has been renamed GNU Compiler Collection or GCC. The upshot of all this is that what was to be egcs-1.2 essentially became gcc-2.95."

I''m sort of curious what GCC 3.1 is like. I''ve heard to stay away from anything above 2.96. It''s a shame really, as it''s been shown that the MS Visual C++ compiler does a better job of optimizations, and the Intel compiler is better still. Is it my imagination, or is Linux starting to run out of steam? I mean no 2.5 developmental kernal, and GCC seems to be stagnating.
The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. We have grasped the mystery of the atom and rejected the Sermon on the Mount." - General Omar Bradley
quote: Original post by Dauntless
I''m sort of curious what GCC 3.1 is like. I''ve heard to stay away from anything above 2.96.

Stay away from 2.96.x (there are acknowledged bugs that aren''t going to get fixed, since 3.x is the new active codebase), and stay away from 3.x unless you know what you''re getting into. 3.x changes the C++ ABI, so compiled C++ code from 3.x cannot access compiled code from 2.x versions. I''ve been using 3.x for a while, and I like it a lot.
quote: Original post by Dauntless
I mean no 2.5 developmental kernal, and GCC seems to be stagnating.

What are you talking about? There has been a 2.5 kernel for monthes.


egcs *works* and that is the primarly criteria for
selecting a compiler (or virtually anything for
that matter). Some newer gcc''s have additional
improvements at the cost of reliability.
Tara Milana - WP Entertainmenthttp://wolfpack.twu.net/Comp graphics artist and programmer.
quote: Original post by i8degrees
Original post by mikael_j
Uh, I thought that egcs was the old name for the c part of gcc? (gcc = gnu compiler collection)

/Mikael


Yeah, me too. Yep, GCC is the standard, and it is quite nice of a compiler, I even use it on Windows (Mingw32). If you like C++ and want the closest thing to the Win32 API, QT is it! It''s another very nice toolkit, many people like it more than MFC, and the documentation is great! A few nice IDE''s are KDevelop (KDE) and Anjuta (GNOME). Check all of that out.


Just a small comment, you don''t need to say that KDev is for KDE and Anjuta is for GNOME as both of them work with KDE, GNOME, Sawfish, Sawfish-merlin, Fluxbox, Blackbox, WindowMaker, Enlightenment, etc. In other words, they work with most window managers… Oh and Anjuta is my prefered IDE but then again, I don''t use IDEs anymore, just plain Vi.



"And that''s the bottom line cause I said so!"

Cyberdrek
danielc@iquebec.com
Founder
Laval Linux

/(bb|[^b]{2})/ that is the Question – ThinkGeek.com
Hash Bang Slash bin Slash Bash – #!/bin/bash
[Cyberdrek | ]

This topic is closed to new replies.

Advertisement