Results 1 to 20 of 31

Thread: compilation error

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: compilation error

    Try adding QT += gui to you .pro file.
    I'm a rebel in the S.D.G.

  2. #2
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compilation error

    I tried by adding "QT += gui" to my .pro file and also i included "#include <QtGui>" in my .cpp file,but the result is same.

    i have visual studio 2005 in my system,but i have not integrated my qt with visual studio.
    is VS2005 cause for this errors?

    previously i installed qt with minGW on my windows system with out having VS2005.at that time examples of qt are compiled fine,but know i am facing this problem.

    what is the reason behind this anyone can explain?
    thanks...

  3. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: compilation error

    Quote Originally Posted by jjbabu View Post
    I tried by adding "QT += gui" to my .pro file and also i included "#include <QtGui>" in my .cpp file,but the result is same.

    i have visual studio 2005 in my system,but i have not integrated my qt with visual studio.
    is VS2005 cause for this errors?

    previously i installed qt with minGW on my windows system with out having VS2005.at that time examples of qt are compiled fine,but know i am facing this problem.

    what is the reason behind this anyone can explain?
    thanks...
    did you build Qt for VS2005?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  4. #4
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: compilation error

    Quote Originally Posted by lyuts View Post
    Try adding QT += gui to you .pro file.
    this flag included by default, from docs
    By default, QT contains both core and gui, ensuring that standard GUI applications can be built without further configuration.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  5. #5
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: compilation error

    Quote Originally Posted by spirit View Post
    this flag included by default, from docs
    Yeah, that's right until a user modifies qmake.conf. Someone might prefer to change the default settings.
    I'm a rebel in the S.D.G.

  6. #6
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compilation error

    of course by default that will be added to our project,but what are the reasons behind those errors.i tried so many ways,but i couldn't rectify those errors.not even examples in the qt are running.

  7. #7
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: compilation error

    ask you again: did you build Qt for VS2005?
    do you use only minGW or VS2005 too?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  8. #8
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compilation error

    i have not build qt with VS2005.i am directly using qt.

  9. #9
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: compilation error

    so, why did you ask about VS? I thought that you have Qt built for MinGW and you try to use this Qt version with VS.
    did you try to make mingw32-make clean & qmake & mingw32-make?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  10. #10
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compilation error

    Spirit let me explain clearly what is my problem:

    STEP1:there is no qt on my machine,it is having VS2005 and .NET framework.

    STEP2:Now i want to develope QT applications,For that reason i downloaded QT version "qt-win-opensource-4.4.3-mingw" and installed along with MINGW in my "C" directory.

    STEP3:i created folder in "C:\Qt\4.4.3" with the name hello and i placed "hello.cpp" file

    STEP4:using "QT4.4.3 command prompt" i compiled my application,for compilation i used
    qmake -project ; qmake ;make.

    at this point of time i got errors of unreferensed which are montion in my 1st post.

    where i did wrong? please help me...

  11. #11
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: compilation error

    looks like you did right steps.
    can you show us what returns this command echo %QTDIR% in "QT4.4.3 command prompt".
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  12. #12
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compilation error

    it is showing like below:

    C:\Qt\4.4.3

  13. #13
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compilation error

    are u interested to see any of my system variables and user variables?

  14. #14
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: compilation error

    I don't know what to say you, looks like you did everything right.
    I don't know what to suggest you except as remove this Qt installation at all, reinstall it and try to compile an example again.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  15. #15
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compilation error

    i did 3times(QT uninstall and installation) as u mentioned in your last post,but no use..i am using qt from last 3 yrs,but i never faced this type of problem.

  16. #16
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: compilation error

    i think after VS2005 was installed by you, some internal variables changed, i m not sure though..could you please post the make file that qmake generates..

  17. #17
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: compilation error

    Quote Originally Posted by spirit View Post
    I don't know what to say you, looks like you did everything right.
    I don't know what to suggest you except as remove this Qt installation at all, reinstall it and try to compile an example again.
    Yes, everything except maybe trying to compile the example from the Qt command prompt. Seems it is missing the include and lib dirs.

  18. #18
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compilation error

    Hi talk2amulya,
    this is my make file:
    ################################################## ###########################
    # Makefile for building: hello
    # Generated by qmake (2.01a) (Qt 4.4.3) on: Tue Apr 7 17:43:37 2009
    # Project: hello.pro
    # Template: app
    # Command: c:\Qt\4.4.3\bin\qmake.exe -win32 -o Makefile hello.pro
    ################################################## ###########################

    first: all
    install: debug-install release-install
    uninstall: debug-uninstall release-uninstall
    MAKEFILE = Makefile
    QMAKE = c:\Qt\4.4.3\bin\qmake.exe
    DEL_FILE = del
    CHK_DIR_EXISTS= if not exist
    MKDIR = mkdir
    COPY = copy /y
    COPY_FILE = $(COPY)
    COPY_DIR = xcopy /s /q /y /i
    INSTALL_FILE = $(COPY_FILE)
    INSTALL_PROGRAM = $(COPY_FILE)
    INSTALL_DIR = $(COPY_DIR)
    DEL_FILE = del
    SYMLINK =
    DEL_DIR = rmdir
    MOVE = move
    CHK_DIR_EXISTS= if not exist
    MKDIR = mkdir
    SUBTARGETS = \
    debug \
    release

    debug: $(MAKEFILE).Debug FORCE
    $(MAKE) -f $(MAKEFILE).Debug
    debug-make_default: $(MAKEFILE).Debug FORCE
    $(MAKE) -f $(MAKEFILE).Debug
    debug-make_first: $(MAKEFILE).Debug FORCE
    $(MAKE) -f $(MAKEFILE).Debug first
    debug-all: $(MAKEFILE).Debug FORCE
    $(MAKE) -f $(MAKEFILE).Debug all
    debug-clean: $(MAKEFILE).Debug FORCE
    $(MAKE) -f $(MAKEFILE).Debug clean
    debug-distclean: $(MAKEFILE).Debug FORCE
    $(MAKE) -f $(MAKEFILE).Debug distclean
    debug-install: $(MAKEFILE).Debug FORCE
    $(MAKE) -f $(MAKEFILE).Debug install
    debug-uninstall: $(MAKEFILE).Debug FORCE
    $(MAKE) -f $(MAKEFILE).Debug uninstall
    release: $(MAKEFILE).Release FORCE
    $(MAKE) -f $(MAKEFILE).Release
    release-make_default: $(MAKEFILE).Release FORCE
    $(MAKE) -f $(MAKEFILE).Release
    release-make_first: $(MAKEFILE).Release FORCE
    $(MAKE) -f $(MAKEFILE).Release first
    release-all: $(MAKEFILE).Release FORCE
    $(MAKE) -f $(MAKEFILE).Release all
    release-clean: $(MAKEFILE).Release FORCE
    $(MAKE) -f $(MAKEFILE).Release clean
    release-distclean: $(MAKEFILE).Release FORCE
    $(MAKE) -f $(MAKEFILE).Release distclean
    release-install: $(MAKEFILE).Release FORCE
    $(MAKE) -f $(MAKEFILE).Release install
    release-uninstall: $(MAKEFILE).Release FORCE
    $(MAKE) -f $(MAKEFILE).Release uninstall

    Makefile: hello.pro ../.qmake.cache ../mkspecs/win32-g++/qmake.conf ../mkspecs/features/exclusive_builds.prf \
    ../mkspecs/features/default_pre.prf \
    ../mkspecs/features/win32/default_pre.prf \
    ../.qmake.cache \
    ../mkspecs/qconfig.pri \
    ../mkspecs/features/qt_functions.prf \
    ../mkspecs/features/qt_config.prf \
    ../mkspecs/features/debug.prf \
    ../mkspecs/features/debug_and_release.prf \
    ../mkspecs/features/default_post.prf \
    ../mkspecs/features/win32/rtti.prf \
    ../mkspecs/features/win32/exceptions.prf \
    ../mkspecs/features/win32/stl.prf \
    ../mkspecs/features/shared.prf \
    ../mkspecs/features/warn_on.prf \
    ../mkspecs/features/qt.prf \
    ../mkspecs/features/win32/thread.prf \
    ../mkspecs/features/moc.prf \
    ../mkspecs/features/win32/windows.prf \
    ../mkspecs/features/resources.prf \
    ../mkspecs/features/uic.prf \
    ../mkspecs/features/yacc.prf \
    ../mkspecs/features/lex.prf \
    c:/Qt/4.4.3/lib/qtmaind.prl
    $(QMAKE) -win32 -o Makefile hello.pro
    ..\mkspecs\features\exclusive_builds.prf:
    ..\mkspecs\features\default_pre.prf:
    ..\mkspecs\features\win32\default_pre.prf:
    ..\.qmake.cache:
    ..\mkspecs\qconfig.pri:
    ..\mkspecs\features\qt_functions.prf:
    ..\mkspecs\features\qt_config.prf:
    ..\mkspecs\features\debug.prf:
    ..\mkspecs\features\debug_and_release.prf:
    ..\mkspecs\features\default_post.prf:
    ..\mkspecs\features\win32\rtti.prf:
    ..\mkspecs\features\win32\exceptions.prf:
    ..\mkspecs\features\win32\stl.prf:
    ..\mkspecs\features\shared.prf:
    ..\mkspecs\features\warn_on.prf:
    ..\mkspecs\features\qt.prf:
    ..\mkspecs\features\win32\thread.prf:
    ..\mkspecs\features\moc.prf:
    ..\mkspecs\features\win32\windows.prf:
    ..\mkspecs\features\resources.prf:
    ..\mkspecs\features\uic.prf:
    ..\mkspecs\features\yacc.prf:
    ..\mkspecs\features\lex.prf:
    c:\Qt\4.4.3\lib\qtmaind.prl:
    qmake: qmake_all FORCE
    @$(QMAKE) -win32 -o Makefile hello.pro

    qmake_all: FORCE

    make_default: debug-make_default release-make_default FORCE
    make_first: debug-make_first release-make_first FORCE
    all: debug-all release-all FORCE
    clean: debug-clean release-clean FORCE
    distclean: debug-distclean release-distclean FORCE
    -$(DEL_FILE) Makefile

    debug-mocclean: $(MAKEFILE).Debug
    $(MAKE) -f $(MAKEFILE).Debug mocclean
    release-mocclean: $(MAKEFILE).Release
    $(MAKE) -f $(MAKEFILE).Release mocclean
    mocclean: debug-mocclean release-mocclean

    debug-mocables: $(MAKEFILE).Debug
    $(MAKE) -f $(MAKEFILE).Debug mocables
    release-mocables: $(MAKEFILE).Release
    $(MAKE) -f $(MAKEFILE).Release mocables
    mocables: debug-mocables release-mocables
    FORCE:

    $(MAKEFILE).Debug: Makefile
    $(MAKEFILE).Release: Makefile

Similar Threads

  1. Compile 4.4.0
    By LordQt in forum Installation and Deployment
    Replies: 18
    Last Post: 29th May 2008, 13:43
  2. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  3. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 02:49
  4. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 12:19
  5. Qt-x11-commercial-src-4.2.0-snapshot-20060824 error
    By DevObject in forum Installation and Deployment
    Replies: 4
    Last Post: 24th August 2006, 23:31

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.