Results 1 to 5 of 5

Thread: eclipse and /usr/lib/crt1.o(.text+0x18): In function `_start':

  1. #1
    Join Date
    Nov 2007
    Posts
    291
    Thanks
    85
    Thanked 1 Time in 1 Post

    Default eclipse and /usr/lib/crt1.o(.text+0x18): In function `_start':

    hi

    i got the following error

    /usr/lib/crt1.o(.text+0x18): In function `_start':
    make[1]: Leaving directory `/home/bala/workspace_qtdemo/anim_mainwindow'
    : undefined reference to `main'
    collect2: ld returned 1 exit status
    make[1]: *** [anim_mainwindow] Error 1
    make: *** [release] Error 2

    while compiling this program in eclipse


    Qt Code:
    1. #include <QApplication>
    2.  
    3. int main(int argc, char *argv[])
    4. {
    5. QApplication a(argc, argv);
    6. return a.exec();
    7. }
    To copy to clipboard, switch view to plain text mode 

    i googled and found that if there is no main in the program then this error occurs.

    i have created a seperate project and compiled the same code by copying and pasting the same ,it works fine .

    so what is causing this error.
    Last edited by jpn; 2nd January 2008 at 13:24. Reason: changed [quote] to [code] tags

  2. #2
    Join Date
    Nov 2007
    Posts
    291
    Thanks
    85
    Thanked 1 Time in 1 Post

    Default Re: eclipse and /usr/lib/crt1.o(.text+0x18): In function `_start':

    hi
    i have found what had caused error(the .pro file)but i had not figured out why the error has occured.

    the error occurs when the .pro file is like this

    TEMPLATE = app
    TARGET = anim_mainwindow
    QT += core \
    gui
    HEADERS +=

    SOURCES += main.cpp \

    FORMS +=
    RESOURCES +=
    SOURCES =



    there is no error when the .pro is modified like this

    TEMPLATE = app
    TARGET = gggggg

    QT += core gui

    HEADERS +=
    SOURCES += main.cpp
    FORMS +=
    RESOURCES +=



    what is the error in the former dot pro file

  3. #3
    Join Date
    Nov 2007
    Posts
    291
    Thanks
    85
    Thanked 1 Time in 1 Post

    Default Re: eclipse and /usr/lib/crt1.o(.text+0x18): In function `_start':

    oh ..
    i found the problem .in the first .pro file i have typed SOURCES instead of RESOURCES .therefore the SOURCES had been occured twice in the .pro file which had caused error.

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: eclipse and /usr/lib/crt1.o(.text+0x18): In function `_start':

    There's an extra "\".
    J-P Nurmi

  5. #5
    Join Date
    Nov 2007
    Posts
    291
    Thanks
    85
    Thanked 1 Time in 1 Post

    Default Re: eclipse and /usr/lib/crt1.o(.text+0x18): In function `_start':

    yes thats right
    that gives different error that is related with forms since forms follow the "\".
    even after clearing the "\" the error still exists and it is cleared only when the spell mistakes are made right.

Similar Threads

  1. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  2. how to add static library into qmake
    By Namrata in forum Qt Tools
    Replies: 1
    Last Post: 20th November 2007, 17:33
  3. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  4. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 12:52
  5. I got two problems when I used static compiled library of QT4
    By qintm in forum Installation and Deployment
    Replies: 8
    Last Post: 20th April 2006, 08:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.