Results 1 to 15 of 15

Thread: Building the entire project

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2006
    Posts
    339
    Thanks
    15
    Thanked 21 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Building the entire project

    I used this and it runs the makefile
    Qt Code:
    1. PRE_TARGETDEPS += libcryp.a
    2. MKFL = cryptoPP/GNUmakefile
    3. tst.input = MKFL
    4. tst.commands = cd cryptoPP/ && make
    5. tst.CONFIG = no_link
    6. tst.output = libcryp.a
    7. QMAKE_EXTRA_UNIX_COMPILERS += tst
    To copy to clipboard, switch view to plain text mode 

    It creates the static library libcryp.a. Evenrything goes on fine
    but at last this error occurs

    Qt Code:
    1. [raj@fedora4 cmbedit]# qmake ce.pro
    2. [raj@fedora4 cmbedit]# make clean
    3. rm -f *~ core *.core
    4. [raj@fedora4 cmbedit]# make
    5. cd cryptoPP/ && make
    6. make[1]: Entering directory `/raj/rajTest/cmbedit/cryptoPP'
    7. make[1]: Nothing to be done for `all'.
    8. make[1]: Leaving directory `/raj/rajTest/cmbedit/cryptoPP'
    9. g++ -o ce -L/usr/lib/qt-3.3/lib -L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm
    10. /usr/lib/gcc/i386-redhat-linux/4.0.0/../../../crt1.o(.text+0x18): In function
    11. `_start':
    12. : undefined reference to `main'
    13. collect2: ld returned 1 exit status
    14. make: *** [ce] Error 1
    To copy to clipboard, switch view to plain text mode 
    What is wrong here now???

  2. #2
    Join Date
    Jan 2006
    Posts
    128
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Building the entire project

    Quote Originally Posted by vermarajeev View Post
    Qt Code:
    1. make[1]: Leaving directory `/raj/rajTest/cmbedit/cryptoPP'
    2. g++ -o ce -L/usr/lib/qt-3.3/lib -L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm
    3. /usr/lib/gcc/i386-redhat-linux/4.0.0/../../../crt1.o(.text+0x18): In function
    4. `_start':
    5. : undefined reference to `main'
    6. collect2: ld returned 1 exit status
    7. make: *** [ce] Error 1
    To copy to clipboard, switch view to plain text mode 
    What is wrong here now???
    I had these kind of problems, when I had an "empty" pro file. i.e. when I had no targets/sources in the file itself.

    Qmake tries to compile "No Source File", and then tries to link it. Of course, when you do not have no source, you did not define a main function...which your linker complains about.

    Add your real project infos to the pro file and the problem should vanish...

Similar Threads

  1. making new project qt4
    By !Ci in forum Qt Programming
    Replies: 1
    Last Post: 18th June 2009, 13:32
  2. how do i use a same project in multiple systems ?
    By nhatkhang in forum KDE Forum
    Replies: 6
    Last Post: 21st December 2006, 16:32
  3. Project generation on linux from QT Project
    By darpan in forum Qt Programming
    Replies: 6
    Last Post: 11th December 2006, 09:43
  4. Clean project deletes makefile
    By Djony in forum Qt Programming
    Replies: 2
    Last Post: 7th December 2006, 10:15
  5. Replies: 2
    Last Post: 11th July 2006, 14:19

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
  •  
Qt is a trademark of The Qt Company.