babu198649
2nd January 2008, 13:17
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
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, 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:.
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
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, 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:.