Results 1 to 9 of 9

Thread: Installation wrong?

  1. #1
    Join Date
    Aug 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Installation wrong?

    Hiiii people... i'm new in this thing, but whean i read the overview about Qt.. i think i should try this one..so..this is my first thread.

    i've installed Qt opensource 4.3.1 (include MinGW 3.4.2), which i downloaded binary version, so it should be no problem..
    But when I followed example on 'http://doc.trolltech.com/4.1/tutorial-t1.html':

    #include <QApplication>
    #include <QPushButton>

    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);

    QPushButton hello("Hello world!");
    hello.resize(100, 30);

    hello.show();
    return app.exec();
    }

    it succssed with 'qmake -projecth' and it was resulting file *.pro
    then i run 'qmake' it was resulting Makefile file
    but when i was running 'make', theres nothing happened (doesn't creating a new file) but theres a message:

    'MAKE Version 5.2 Copyright (c) 1987, 1998 Inprise Corp.
    Fatal: 'FORCE' does not exist - don't know how to make it'



    I really don't know which file to execute/run like wrote in the example/tutorial...
    I've been setting up the environment variable too.. the path, qtdir, and qtspec and for now i only use Notepad++ as editor.

    What should I do to solve this problem? thank's anyway..

    -rei-

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Installation wrong?

    It seems to be running wrong make. Are you using Qt command prompt (can be found from the start menu)? It will automatically adjust environment variables for you so that C:\MinGW\bin or corresponding comes first in PATH. You can do it by hand too, or alternatively you can run 'mingw32-make'.
    J-P Nurmi

  3. #3
    Join Date
    Aug 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Installation wrong?

    thanks for replying my thread..

    I'd done what what you said, but when i run 'mingw32-make' there was a message:

    mingw32-make: Nothing to be done for `first'.

    And i also tried mingw32-make with some parameters, but the result still the same.

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Installation wrong?

    In that case there must be something wrong with generated project and/or makefiles too.

    What if you
    • clean up the directory so that there is only that single .cpp file (did it contain other stuff in the first place?)
    • launch "Qt Command Prompt" from Start-menu
    • run "qmake -project", "qmake" and "make"

    ?
    J-P Nurmi

  5. #5
    Join Date
    Aug 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Installation wrong?

    Woww... very fast you reply my thread jpn..thanks a lot..

    i've already did what you told me.. but the result still the same..
    and this is my file that you've told:

    1. test2.pro
    ################################################## ####################
    # Automatically generated by qmake (2.01a) Tue Aug 28 23:42:02 2007
    ################################################## ####################

    TEMPLATE = subdirs

    # Directories



    2. Makefile
    ################################################## ###########################
    # Makefile for building: test2
    # Generated by qmake (2.01a) (Qt 4.3.1) on: Tue Aug 28 23:42:10 2007
    # Project: test2.pro
    # Template: subdirs
    # Command: c:\Qt\4.3.1\bin\qmake.exe -win32 -o Makefile test2.pro
    ################################################## ###########################

    first: make_default
    MAKEFILE = Makefile
    QMAKE = c:\Qt\4.3.1\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 =


    Makefile: test2.pro ..\..\Qt\4.3.1\mkspecs\win32-g++\qmake.conf ..\..\Qt\4.3.1\mkspecs\qconfig.pri \
    ..\..\Qt\4.3.1\mkspecs\features\qt_functions.prf \
    ..\..\Qt\4.3.1\mkspecs\features\qt_config.prf \
    ..\..\Qt\4.3.1\mkspecs\features\exclusive_builds.p rf \
    ..\..\Qt\4.3.1\mkspecs\features\default_pre.prf \
    ..\..\Qt\4.3.1\mkspecs\features\win32\default_pre. prf \
    ..\..\Qt\4.3.1\mkspecs\features\debug.prf \
    ..\..\Qt\4.3.1\mkspecs\features\debug_and_release. prf \
    ..\..\Qt\4.3.1\mkspecs\features\default_post.prf \
    ..\..\Qt\4.3.1\mkspecs\features\win32\rtti.prf \
    ..\..\Qt\4.3.1\mkspecs\features\win32\exceptions.p rf \
    ..\..\Qt\4.3.1\mkspecs\features\win32\stl.prf \
    ..\..\Qt\4.3.1\mkspecs\features\shared.prf \
    ..\..\Qt\4.3.1\mkspecs\features\warn_on.prf \
    ..\..\Qt\4.3.1\mkspecs\features\qt.prf \
    ..\..\Qt\4.3.1\mkspecs\features\win32\thread.prf \
    ..\..\Qt\4.3.1\mkspecs\features\moc.prf \
    ..\..\Qt\4.3.1\mkspecs\features\win32\windows.prf \
    ..\..\Qt\4.3.1\mkspecs\features\resources.prf \
    ..\..\Qt\4.3.1\mkspecs\features\uic.prf \
    ..\..\Qt\4.3.1\mkspecs\features\yacc.prf \
    ..\..\Qt\4.3.1\mkspecs\features\lex.prf
    $(QMAKE) -win32 -o Makefile test2.pro
    ..\..\Qt\4.3.1\mkspecs\qconfig.pri:
    ..\..\Qt\4.3.1\mkspecs\features\qt_functions.prf:
    ..\..\Qt\4.3.1\mkspecs\features\qt_config.prf:
    ..\..\Qt\4.3.1\mkspecs\features\exclusive_builds.p rf:
    ..\..\Qt\4.3.1\mkspecs\features\default_pre.prf:
    ..\..\Qt\4.3.1\mkspecs\features\win32\default_pre. prf:
    ..\..\Qt\4.3.1\mkspecs\features\debug.prf:
    ..\..\Qt\4.3.1\mkspecs\features\debug_and_release. prf:
    ..\..\Qt\4.3.1\mkspecs\features\default_post.prf:
    ..\..\Qt\4.3.1\mkspecs\features\win32\rtti.prf:
    ..\..\Qt\4.3.1\mkspecs\features\win32\exceptions.p rf:
    ..\..\Qt\4.3.1\mkspecs\features\win32\stl.prf:
    ..\..\Qt\4.3.1\mkspecs\features\shared.prf:
    ..\..\Qt\4.3.1\mkspecs\features\warn_on.prf:
    ..\..\Qt\4.3.1\mkspecs\features\qt.prf:
    ..\..\Qt\4.3.1\mkspecs\features\win32\thread.prf:
    ..\..\Qt\4.3.1\mkspecs\features\moc.prf:
    ..\..\Qt\4.3.1\mkspecs\features\win32\windows.prf:
    ..\..\Qt\4.3.1\mkspecs\features\resources.prf:
    ..\..\Qt\4.3.1\mkspecs\features\uic.prf:
    ..\..\Qt\4.3.1\mkspecs\features\yacc.prf:
    ..\..\Qt\4.3.1\mkspecs\features\lex.prf:
    qmake: qmake_all FORCE
    @$(QMAKE) -win32 -o Makefile test2.pro

    qmake_all: FORCE

    make_default: FORCE
    make_first: FORCE
    all: FORCE
    clean: FORCE
    distclean: FORCE
    -$(DEL_FILE) Makefile
    install_subtargets: FORCE
    uninstall_subtargets: FORCE

    debug:

    release:

    mocclean: compiler_moc_header_clean compiler_moc_source_clean

    mocables: compiler_moc_header_make_all compiler_moc_source_make_all
    install: install_subtargets FORCE

    uninstall: uninstall_subtargets FORCE

    FORCE:


    Any suggestion, or may be i should try to reinstal the Qt and MinGW? I'm using MinGW 3.4.2 which already provided in bundled when i was download Qt4 binary..

  6. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Installation wrong?

    Alright, the project file is what causes the problem. I'm still suspecting "qmake -project" is run in a directory which is not clean. There should be nothing but files belonging to the project you want to generate a .pro file for. What does "tree /f" output?

    The generated project file should look more or less like this:
    TEMPLATE = app
    TARGET =
    DEPENDPATH += .
    INCLUDEPATH += .

    # Input
    SOURCES += main.cpp
    J-P Nurmi

  7. #7
    Join Date
    Aug 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Installation wrong?

    hahaha... ok, you right!!
    I didn't find another 'mingw32-make: Nothing to be done for `first'.'....
    But.. now, i have another error..

    C:\QtProject>cd test3

    C:\QtProject\test3>dir
    Volume in drive C has no label.
    Volume Serial Number is 4CC5-5354

    Directory of C:\QtProject\test3

    08/29/2007 12:04 AM <DIR> .
    08/29/2007 12:04 AM <DIR> ..
    08/29/2007 12:04 AM 271 main.cpp
    1 File(s) 271 bytes
    2 Dir(s) 122,384,683,008 bytes free

    C:\QtProject\test3>tree /f
    Folder PATH listing
    Volume serial number is 0000BAEF 4CC5:5354
    C:.
    main.cpp

    No subfolders exist


    C:\QtProject\test3>qmake -project

    C:\QtProject\test3>tree /f
    Folder PATH listing
    Volume serial number is 0000F9A5 4CC5:5354
    C:.
    main.cpp
    test3.pro

    No subfolders exist


    C:\QtProject\test3>qmake

    C:\QtProject\test3>tree /f
    Folder PATH listing
    Volume serial number is 000019C0 4CC5:5354
    C:.
    │ main.cpp
    │ Makefile
    │ Makefile.Debug
    │ Makefile.Release
    │ test3.pro

    ├───debug
    └───release

    C:\QtProject\test3>make
    mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory `C:/QtProject/test3'
    g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
    DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..
    \Qt\4.3.1\include\QtCore" -I"..\..\Qt\4.3.1\include\QtCore" -I"..\..\Qt\4.3.1\in
    clude\QtGui" -I"..\..\Qt\4.3.1\include\QtGui" -I"..\..\Qt\4.3.1\include" -I"." -
    I"..\..\Qt\4.3.1\include\ActiveQt" -I"debug" -I"." -I"..\..\Qt\4.3.1\mkspecs\win
    32-g++" -o debug\main.o main.cpp
    main.cpp:13:6: warning: no newline at end of file
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
    oc -mthreads -Wl -Wl,-subsystem,windows -o "debug\test3.exe" debug\main.o -L"c:
    \Qt\4.3.1\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
    C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot fin
    d -lqtmaind
    collect2: ld returned 1 exit status
    mingw32-make[1]: *** [debug\test3.exe] Error 1
    mingw32-make[1]: Leaving directory `C:/QtProject/test3'
    mingw32-make: *** [debug] Error 2

    C:\QtProject\test3>

  8. #8
    Join Date
    Aug 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Installation wrong?

    hiii jpn.. finally I reinstalled Qt4 with new version of MinGW (download manually).. and it works!
    I don't know what happened with the MinGW that was bundled within Qt4 binary file.

    But..really thanks for your help!

  9. #9
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Installation wrong?

    Hello again
    Quote Originally Posted by reilatedray View Post
    C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot find -lqtmaind
    The default installation of Qt/Win installs only release versions of libraries. There is a start-menu shortcut for building a bit more space consuming debug libraries. What happens here is that it attempts to build a debug version of hello world where linking fails due to missing debug libraries. You can build a release version instead by passing parameters "config -release" to qmake or alternatively adding "CONFIG += release" to .pro file.
    J-P Nurmi

Similar Threads

  1. QT 4 Toolkit Installation Guide
    By Salazaar in forum Newbie
    Replies: 6
    Last Post: 28th October 2007, 08:54
  2. Installation of application data files
    By anderssonj in forum Qt Programming
    Replies: 1
    Last Post: 4th July 2007, 17:02
  3. Cannot find file: winmain.pro in Qt installation
    By jivanr in forum Installation and Deployment
    Replies: 3
    Last Post: 11th June 2007, 13:22
  4. installation of qt4.2: linux
    By Jim Peterson in forum Installation and Deployment
    Replies: 7
    Last Post: 2nd March 2007, 19:03
  5. do Qt4 installation depends on gcc version
    By quickNitin in forum Installation and Deployment
    Replies: 3
    Last Post: 3rd October 2006, 07:14

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.