I am using Linux 10.10. Trying to use QT4 as I would like to avoid alternative IDEs and languages. I can not get past the $ make
g++ -Wl,-O1 -o slider -L/usr/lib -lQtGui -lQtC开发者_运维知识库ore -lpthread
/usr/lib/gcc/i686-linux-gnu/4.4.5/../../../../lib/crt1.o: In function _start':
(.text+0x18): undefined reference to
main'
collect2: ld returned 1 exit status.
No matter what I do, I searched the manual but found it referencing more Windows stuff than Linux. It is so obscure that my level of frustration leads me to ask one more time. I really do not want to go to Oracle's stuff. Can someone help?
I put together the demo file using the three sliders that change and show the values in the spin box. I tested it in the main development area using the control "r" feature. It works fine . I then save it to a file and do the following in the directory "slider" where I stored the file: qmake -project qmake make
The results are:$
$ make
g++ -Wl,-O1 -o slider -L/usr/lib -lQtGui -lQtCore -lpthread
/usr/lib/gcc/i686-linux-gnu/4.4.5/../../../../lib/crt1.o: In function _start':
(.text+0x18): undefined reference to
main'
collect2: ld returned 1 exit status
make: * [slider] Error 1
I suspect that I do not have the correct information in either the .project file or the Makefile. However, I don't know what else to place there. The names .Ui seem suspicious but I just don't know enough to validate that. Thanks Harry Fernandina Beach, Floria
精彩评论