New to C++ on Linux

Discussion in 'C++' started by Teddy, Jul 23, 2003.

  1. Teddy

    Teddy Guest

    I have installed GNU C/C++ on my Linux and tried to compile my first
    helloworld program. I tried this with the command:

    cc helloworld.cpp -c -o helloworld.o && ld helloworld.o -lstdc++ -o
    helloworld

    And got the Error:

    ld: warning: cannot find entry symbol _start; defaulting to 08048380

    The program was created but does not work. What did I do wrong?
    The source of my helloworld-program you can find at the end.

    Thanks
    Teddy



    #include <iostream>

    using std::cout;
    using std::endl;

    int main() {

    cout << "Hello World" << endl;

    return 0;
    }
    Teddy, Jul 23, 2003
    #1
    1. Advertising

  2. Hi, I'm not sure what's wrong, but you could try this command:

    c++ -o helloworld helloworld.cpp

    "Teddy" <> wrote in message
    news:3f1e5097$0$22088$...
    > I have installed GNU C/C++ on my Linux and tried to compile my first
    > helloworld program. I tried this with the command:
    >
    > cc helloworld.cpp -c -o helloworld.o && ld helloworld.o -lstdc++ -o
    > helloworld
    >
    > And got the Error:
    >
    > ld: warning: cannot find entry symbol _start; defaulting to 08048380
    >
    > The program was created but does not work. What did I do wrong?
    > The source of my helloworld-program you can find at the end.
    >
    > Thanks
    > Teddy
    >
    >
    >
    > #include <iostream>
    >
    > using std::cout;
    > using std::endl;
    >
    > int main() {
    >
    > cout << "Hello World" << endl;
    >
    > return 0;
    > }
    >
    Lars Magne Engedal, Jul 23, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. (=?iso-8859-1?Q?=AF=60=B7=2E=2E=2E=F8=A4=B0=60=B0=

    EAGLE v4.11 Professional *Bilingual* - Cadsoft (Windows, Linux - new !

    (=?iso-8859-1?Q?=AF=60=B7=2E=2E=2E=F8=A4=B0=60=B0=, Oct 7, 2003, in forum: VHDL
    Replies:
    0
    Views:
    818
    (=?iso-8859-1?Q?=AF=60=B7=2E=2E=2E=F8=A4=B0=60=B0=
    Oct 7, 2003
  2. Sudsy
    Replies:
    1
    Views:
    338
    Brad BARCLAY
    Jan 7, 2004
  3. U. George
    Replies:
    4
    Views:
    835
    U. George
    Aug 11, 2005
  4. Krishna Chaitanya
    Replies:
    1
    Views:
    138
    Krishna Chaitanya
    Feb 27, 2009
  5. Replies:
    2
    Views:
    450
    Thomas 'PointedEars' Lahn
    Mar 11, 2008
Loading...

Share This Page