Compilation Error

Discussion in 'C Programming' started by ysc32, Sep 26, 2006.

  1. ysc32

    ysc32

    Joined:
    Sep 26, 2006
    Messages:
    1
    Hi, I am new to C++ and I am writing a code for SUSE Linux 10. I would like to compile my file "program.cpp" to "program.so" but I get the following error message:

    /usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../lib64/crt1.o: In function `_start':
    ../sysdeps/x86_64/elf/start.S:109: undefined reference to `main'
    collect2: ld returned 1 exit status

    What I did was:

    g++ program.cpp -o program.so

    Please can anyone help as I have no idea where the problem is. Many thanks for your time.

    ysc32
     
    ysc32, Sep 26, 2006
    #1
    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. Vittal
    Replies:
    2
    Views:
    725
    Gordon Burditt
    Jul 8, 2003
  2. =?ISO-8859-1?Q?Martin_J=F8rgensen?=
    Replies:
    5
    Views:
    1,316
    =?ISO-8859-1?Q?Martin_J=F8rgensen?=
    May 6, 2006
  3. Gavin
    Replies:
    3
    Views:
    495
    Chris Uppal
    Mar 28, 2007
  4. C__chp
    Replies:
    4
    Views:
    520
    Puppet_Sock
    Feb 15, 2008
  5. Tassador

    const string error compilation - error C2679

    Tassador, Jul 19, 2009, in forum: C Programming
    Replies:
    0
    Views:
    630
    Tassador
    Jul 19, 2009
Loading...

Share This Page