Results 1 to 4 of 4

Thread: Linux C++ Compiling

  1. #1
    Join Date
    Jun 2002

    Linux C++ Compiling

    Hey all,

    I am starting to use C++, and i made a simple 'Hello World' program. I was wondering, were is a Linux C++ compiler to compile this file?


  2. #2
    Senior Member problemchild's Avatar
    Join Date
    Jul 2002
    GCC comes with every Linux distro and includes a C++ compiler that I think should meet your needs. But then, I've never written a line of code in my life and don't know the first thing about C++, so I might be totally off base on what you need.
    Do what you want with the girl, but leave me alone!

  3. #3
    Senior Member
    Join Date
    Aug 2002
    A great place to read up on this is the man pages.

    The gcc commpand that will compile your code is:

    gcc filename.c -o outputfilename

    This will invoke gcc, then to execute your new program:

    I hope this helps you!
    Civilization. The death of dreams.

  4. #4
    Senior Member
    Join Date
    Nov 2001
    The c++ commandline syntax for gcc is 'g++'. Try this: 'g++ filename.cpp -o outputfilename'. g++ calls gcc with flags to recognize c++ code.

    For larger projects with lots of source & header files I recommend qmake by trolltech (www.trolltech.com). It makes compiling easy.

    I've made a tutorial on qmake. Check out my homepage: http://home.no/adiv/beginqt.htm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts