LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   where can I find the resource of GCC and c++ for linux documents? (https://www.linuxquestions.org/questions/programming-9/where-can-i-find-the-resource-of-gcc-and-c-for-linux-documents-22629/)

wolfshome 06-05-2002 02:37 AM

where can I find the resource of GCC and c++ for linux ?
 
hi.
I want to learn C++ for linux ,but I don't know the difference of Microsotf windows version and linux version.
Please give me an URL!
thanks!!


:study: :study:

Config 06-05-2002 06:05 AM

C++ is a language so you can use it in Linux the same way. Microsoft has just extended C++ a little bit. If you're new to c++,o you won't note the difference anyway. Try to look at some linux programming books. I think Wrox has some (www.wrox.com) good books about Linuxprogramming.
The C compiler is gcc. The gcc homepage is gcc.gnu.org
However, I would just learn it by using itm, don't try to read a manual

llama_meme 06-05-2002 06:08 AM

The core C++ language is the same on all platforms (that's why we give it the same name ;)). Obviously anything more complicated than simple file i/o requires you to make calls to the operating system which will differ between Windows and Linux.

Using gcc on the command line is pretty easy (man gcc for more info). This would compile test.c and produce the execuatable file test:

gcc test.c -o test

For C++ files use g++:

g++ test.cc -o test

(A variety of file extensions are used for C++ files under UNIX/Linux, you can use .cpp if you want to).

For larger projects you'll want to look into Make and the Autotools (do some googling). Standard GUI toolkits for Linux are Qt (www.trolltech.com) and Gtk+ (www.gtk.org).

Alex


All times are GMT -5. The time now is 12:12 PM.