Results 1 to 8 of 8

Thread: Confused as to how to run C++

  1. #1
    Join Date
    Sep 2009
    Location
    Pakistan
    Posts
    201

    Unhappy Confused as to how to run C++

    OK... Now I'm confused.
    According to what I've heard, the GCC and GCC-C++ packages are all I need to run C++ and develop apps on Linux with it. OK, I've installed them both, but how do I run it? There's no option in the menus for it.
    Can anyone help me in this matter?

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,331
    Blog Entries
    15

    Default Re: Confused as to how to run C++

    Quote Originally Posted by BrownieCat
    OK... Now I'm confused.
    According to what I've heard, the GCC and GCC-C++ packages are all I
    need to run C++ and develop apps on Linux with it. OK, I've installed
    them both, but how do I run it? There's no option in the menus for it.
    Can anyone help me in this matter?
    Hi
    Those are the progams to compile your application. Your wanting an IDE
    to code in? Maybe installing codeblocks, else use your favorite text
    editor and code away, then run the commands to compile.

    --
    Cheers Malcolm (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.29-0.1-default
    up 3 days 3:01, 3 users, load average: 0.12, 0.15, 0.48
    GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18


  3. #3
    Join Date
    Sep 2008
    Location
    Slovenia
    Posts
    335

    Default Re: Confused as to how to run C++

    According to what I've heard, the GCC and GCC-C++ packages are all I need to run C++ and develop apps on Linux wit
    Hi, I would suggest you to try NetBeans Welcome to NetBeans, it is in my opinion a nice modern IDE (Integrated Development Environment) mostly meant for java programming, but allows you to do programming also in: C++,PHP,Ruby.

  4. #4
    Join Date
    Mar 2009
    Location
    London
    Posts
    426

    Default Re: Confused as to how to run C++

    To compile:

    Code:
    c++ 'your-source-code-file' -o 'output-program-name'
    To run:
    Code:
    ./'output-program-name'

  5. #5
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: Confused as to how to run C++

    Quote Originally Posted by BrownieCat View Post
    OK... Now I'm confused.
    According to what I've heard, the GCC and GCC-C++ packages are all I need to run C++ and develop apps on Linux with it. OK, I've installed them both, but how do I run it? There's no option in the menus for it.
    Can anyone help me in this matter?
    GCC is a compiler, not a code developing tool You need an IDE for that, or use a text editor and manually write the code. Then use gcc to compile it

  6. #6
    Join Date
    Sep 2009
    Location
    Pakistan
    Posts
    201

    Default Re: Confused as to how to run C++

    Many thanks for all the help!
    I might try NetBeans, but I might try coding in a text-editor... Haven't decided yet. NetBeans sounds easier, though.

  7. #7
    Join Date
    Oct 2009
    Location
    Sweden
    Posts
    7

    Default Re: Confused as to how to run C++

    Quote Originally Posted by BrownieCat View Post
    Many thanks for all the help!
    I might try NetBeans, but I might try coding in a text-editor... Haven't decided yet. NetBeans sounds easier, though.
    The full blown development IDE's give's you a lot of things for free and are in my opinion quite usefull if u are working on big projekts or just have started programing.

    But it is usefull(my opinion ) to have knowledge on how to compile using only the compiler and how to compile using for an example an makefile. So my tip is to you atleast try it out(maybe not right now, but in the future)

  8. #8
    Join Date
    Jun 2008
    Location
    /dev/swat
    Posts
    1,181

    Default Re: Confused as to how to run C++

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Those are the progams to compile your application. Your wanting an IDE
    to code in? Maybe installing codeblocks, else use your favorite text
    editor and code away, then run the commands to compile.

    --
    Cheers Malcolm (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.29-0.1-default
    up 3 days 3:01, 3 users, load average: 0.12, 0.15, 0.48
    GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18
    +1 for codeblocks.

    Arif
    swat
    Linux[openSUSE, KDE], PHP, MySQL, Wordpress, Tech News, etc :
    http://anl4u.com

Posting Permissions

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