eclipse and /usr/lib/crt1.o(.text+0x18): In function `_start':
hi
i got the following error
Quote:
/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
Code:
#include <QApplication>
int main(int argc, char *argv[])
{
return a.exec();
}
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:confused:.
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:confused:
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.
Re: eclipse and /usr/lib/crt1.o(.text+0x18): In function `_start':
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.