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
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    15
    Thanked 21 Times in 16 Posts

    Default Re: Building the entire project

    Quote Originally Posted by wysota View Post
    This works for me:
    Not on my system

    I tried putting

    Qt Code:
    1. PRE_TARGETDEPS += dummy
    2. MKFL = ../cryp/GNUmakefile //cryp is a directory where the GNUmakefile is present
    3. tst.input = MKFL
    4. tst.commands = cd ../cryp && make
    5. tst.CONFIG = no_link
    6. tst.output = dummy
    7.  
    8. QMAKE_EXTRA_COMPILERS += tst
    To copy to clipboard, switch view to plain text mode 
    in ce.pro (project file)

    I get this error
    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. make: *** No rule to make target `dummy', needed by `ce'. Stop.
    6. [raj@fedora4 cmbedit]#
    To copy to clipboard, switch view to plain text mode 

    By the way I think the problem is with version.
    I have qt3.3.5 on my system. Will the above soultion work for it(Qt3.3.5)???

    I have attached GNUmakefile. I dont think there is any problem with it.

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

    Default Re: Building the entire project

    Oh!! where is the attachement lost????

    Never mind I think there is no need, as GNUmakefile work properly for me where I say make to the path where GNUmakefile is present...

    How can I solve the problem as specified in above post???

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

    Default Re: Building the entire project

    Quote Originally Posted by vermarajeev View Post
    Not on my system

    I tried putting

    Qt Code:
    1. PRE_TARGETDEPS += dummy
    2. MKFL = ../cryp/GNUmakefile //cryp is a directory where the GNUmakefile is present
    3. tst.input = MKFL
    4. tst.commands = cd ../cryp && make
    5. tst.CONFIG = no_link
    6. tst.output = dummy
    7.  
    8. QMAKE_EXTRA_COMPILERS += tst
    To copy to clipboard, switch view to plain text mode 
    in ce.pro (project file)

    I get this error
    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. make: *** No rule to make target `dummy', needed by `ce'. Stop.
    6. [raj@fedora4 cmbedit]#
    To copy to clipboard, switch view to plain text mode 

    By the way I think the problem is with version.
    I have qt3.3.5 on my system. Will the above soultion work for it(Qt3.3.5)???

    I have attached GNUmakefile. I dont think there is any problem with it.
    By the way what is that dummy????
    I went through Qt Assistance and found this
    Qt Code:
    1. PRE_TARGETDEPS
    2. All libraries that the target depends on can be listed in this variable. Some backends do not support this, these include MSVC Dsp, and ProjectBuilder .pbproj files. Generally this is support internally by these build tools, this is usefull for explicitly listing dependant static libraries.
    3. This list will go before all builtin dependencies.
    To copy to clipboard, switch view to plain text mode 

    I think the above commands will work with qt3.3.5. I got to know after I went through Qt assistance. I'm just trying out something. Let's see if it works....

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

    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???

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

    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...

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Building the entire project

    I missed that the problem regards Qt3... It won't work as qmake3 uses different variable names. You should consult the docs to see if you can convert the solution to Qt3.

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

    Default Re: Building the entire project

    Quote Originally Posted by wysota View Post
    I missed that the problem regards Qt3... It won't work as qmake3 uses different variable names. You should consult the docs to see if you can convert the solution to Qt3.
    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 

    I think the problem is with this statement
    tst.CONFIG = no_link

    I tried looking for it in Qt3.3.5 but couldnt find. I googled to find this
    Qt Code:
    1. Not linking with the output of QMAKE_EXTRA_UNIX_COMPILERS
    2. qmake assumes that the output of the extra compilers is destined to be linked into the final library or application. If this isn't the case, then you need to do something to stop it.
    3.  
    4. If "mycompiler" is the name of your compiler compound variable, then if you have a member .CONFIG set to no_link, then the output won't get linked. Example.
    5.  
    6. mycompiler.output = ${QMAKE_FILE_BASE}.out
    7. mycompiler.input = MYCOMPILER_INPUT_FILES
    8. mycompiler.commands = foo ${QMAKE_FILE_NAME}
    9. mycompiler.CONFIG = no_link
    10. QMAKE_EXTRA_UNIX_COMPILERS += my_compiler
    11.  
    12. Examples when you might want to do this are for things like generating documentation.
    To copy to clipboard, switch view to plain text mode 

    This is related to Qt4.. What should I replace with no_link in Qt3.3.5 to resolve the above problem.

    Hi camel I tried what you have suggested but I get the same error as shown in above post.
    Is there any way out???

Similar Threads

  1. making new project qt4
    By !Ci in forum Qt Programming
    Replies: 1
    Last Post: 18th June 2009, 14: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, 17:32
  3. Project generation on linux from QT Project
    By darpan in forum Qt Programming
    Replies: 6
    Last Post: 11th December 2006, 10:43
  4. Clean project deletes makefile
    By Djony in forum Qt Programming
    Replies: 2
    Last Post: 7th December 2006, 11:15
  5. Replies: 2
    Last Post: 11th July 2006, 15: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.