Compilation Error

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

  1. ysc32

    ysc32

    Joined:
    Sep 26, 2006
    Messages:
    1
    Likes Received:
    0
    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. Advertisements

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. Weng Tianxiang

    Re: Compilation error reason???

    Weng Tianxiang, Jul 23, 2003, in forum: VHDL
    Replies:
    1
    Views:
    1,773
    Mike Treseler
    Jul 24, 2003
  2. YesMann

    Compilation error

    YesMann, Aug 8, 2003, in forum: VHDL
    Replies:
    2
    Views:
    1,047
    YesMann
    Aug 8, 2003
  3. Vittal
    Replies:
    2
    Views:
    996
    Gordon Burditt
    Jul 8, 2003
  4. =?ISO-8859-1?Q?Martin_J=F8rgensen?=
    Replies:
    5
    Views:
    1,598
    =?ISO-8859-1?Q?Martin_J=F8rgensen?=
    May 6, 2006
  5. Gavin
    Replies:
    3
    Views:
    672
    Chris Uppal
    Mar 28, 2007
  6. C__chp
    Replies:
    4
    Views:
    769
    Puppet_Sock
    Feb 15, 2008
  7. Tassador

    const string error compilation - error C2679

    Tassador, Jul 19, 2009, in forum: C Programming
    Replies:
    0
    Views:
    799
    Tassador
    Jul 19, 2009
  8. Tyrel van Niekerk
    Replies:
    4
    Views:
    677
    Tyrel van Niekerk
    Sep 9, 2003
Loading...