Results 1 to 13 of 13

Thread: I can't compile my program in windows!!

  1. #1
    Join Date
    Aug 2007
    Posts
    64
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question I can't compile my program in windows!!

    I wanted to start the tests of my program in windows, but when I try to compile:

    mingw32-make -f Makefile.Release
    mingw32-make[1]: Entering directory `C:/Documents and Settings/Hudson/Meus documentos/caixa_xpress'
    g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\4.3.2\include\QtCore" -I"..\..\..\..\Qt\4.3.2\include\QtCore" -I"..\..\..\..\Qt\4.3.2\include\QtGui" -I"..\..\..\..\Qt\4.3.2\include\QtGui" -I"..\..\..\..\Qt\4.3.2\include\QtSql" -I"..\..\..\..\Qt\4.3.2\include\QtSql" -I"..\..\..\..\Qt\4.3.2\include" -I"." -I"c:\Qt\4.3.2\include\ActiveQt" -I"release" -I"." -I"..\..\..\..\Qt\4.3.2\mkspecs\win32-g++" -o release\main.o main.cpp
    main.cpp:3:27:ManipulaBanco.h: No such file or directory
    main.cpp:4:27:TelaPrincipal.h: No such file or directory

    .....a lot of errors.....

    mingw32-make[1]: Leaving directory `C:/Documents and Settings/Hudson/Meus documentos/caixa_xpress'

    I can't understand!! The files are the same I used in Linux!!

    Last edited by brevleq; 25th November 2007 at 20:52.

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

    Default Re: I can't compile my program in windows!!

    How does the .pro file look like? Do these files:
    main.cpp:3:27:ManipulaBanco.h: No such file or directory
    main.cpp:4:27:TelaPrincipal.h: No such file or directory
    actually exist in `C:/Documents and Settings/Hudson/Meus documentos/caixa_xpress'?
    J-P Nurmi

  3. #3
    Join Date
    Aug 2007
    Posts
    64
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: I can't compile my program in windows!!

    These files are in caixa_xpress directory!!

    My caixa_xpress.pro is:

    ################################################## ####################
    # Automatically generated by qmake (2.01a) dom 25. nov 18:35:30 2007
    ################################################## ####################

    TEMPLATE = app
    TARGET =
    DEPENDPATH += . \
    bd \
    cadastro \
    criacao_caixa \
    tela_principal \
    listagem\.lista \
    listagem\lista \
    listagem\lista_grupos \
    relatorio\emissao_caixa \
    relatorio\relatorio_credito \
    relatorio\relatorio_debito
    INCLUDEPATH += .

    # Input
    HEADERS += bd/ManipulaBanco.h \
    bd/ManipulaCaixaMensal.h \
    bd/ManipulaGrupos.h \
    bd/ManipulaRegistros.h \
    bd/ManipulaTipos.h \
    cadastro/Cadastro.h \
    criacao_caixa/CriacaoCaixa.h \
    criacao_caixa/InserirRegistro.h \
    tela_principal/.tela_principal.h \
    tela_principal/AbrirDialog.h \
    tela_principal/TelaPrincipal.h \
    listagem/.lista/lista_credito.h \
    listagem/lista/Lista.h \
    listagem/lista_grupos/Adicionar.h \
    listagem/lista_grupos/ListaGrupos.h
    FORMS += cadastro/Cadastro.ui \
    criacao_caixa/CriacaoCaixa.ui \
    criacao_caixa/InserirRegistro.ui \
    criacao_caixa/RemoverTipo.ui \
    tela_principal/AbrirDialog.ui \
    tela_principal/TelaPrincipal.ui \
    listagem/.lista/Lista.ui \
    listagem/lista/Lista.ui \
    listagem/lista_grupos/Adicionar.ui \
    listagem/lista_grupos/ListaGrupos.ui \
    relatorio/emissao_caixa/relatorio_emissao_caixa_Dialog.ui \
    relatorio/relatorio_credito/relatorio_credito_Dialog.ui \
    relatorio/relatorio_debito/relatorio_debito_Dialog.ui
    SOURCES += main.cpp \
    bd/ManipulaBanco.cpp \
    bd/ManipulaCaixaMensal.cpp \
    bd/ManipulaGrupos.cpp \
    bd/ManipulaRegistros.cpp \
    bd/ManipulaTipos.cpp \
    cadastro/Cadastro.cpp \
    criacao_caixa/CriacaoCaixa.cpp \
    criacao_caixa/InserirRegistro.cpp \
    tela_principal/.tela_principal.cpp \
    tela_principal/AbrirDialog.cpp \
    tela_principal/TelaPrincipal.cpp \
    listagem/.lista/lista_credito.cpp \
    listagem/lista/Lista.cpp \
    listagem/lista_grupos/Adicionar.cpp \
    listagem/lista_grupos/ListaGrupos.cpp
    QT+=sql


    you can see that the files the compiler isn't find, are in the caixa_xpress.pro and are in the correct directory!!

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

    Default Re: I can't compile my program in windows!!

    Are you sure there are no filename clashes due to the fact that Windows filesystem is case insensitive?

  5. #5
    Join Date
    Nov 2006
    Location
    Shrewsbury, UK
    Posts
    97
    Thanks
    3
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: I can't compile my program in windows!!

    Try adding

    INCLUDEPATH += ./bd

    Pete

  6. #6
    Join Date
    Aug 2007
    Posts
    64
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: I can't compile my program in windows!!

    Guys I putted

    INCLUDEPATH += ./bd

    in the .pro file, ok the messages telling that the file was not found hided! But anothers messages telling others .h files not found was showed. I tried putting the path to that files like:

    INCLUDEPATH += ./tela_principal
    ...

    but the messages don't hide and consequently the program isn't compilled!!

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: I can't compile my program in windows!!

    Try changing DEPENDPATH to INCLUDEPATH. And don't use the slashdot, it's not needed.

  8. #8
    Join Date
    Nov 2006
    Location
    Shrewsbury, UK
    Posts
    97
    Thanks
    3
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: I can't compile my program in windows!!

    Quote Originally Posted by wysota View Post
    Try changing DEPENDPATH to INCLUDEPATH. And don't use the slashdot, it's not needed.
    No its not needed, its just my style preference for include paths. I hoped that brevleq might have noticed that DEPENDPATH was the wrong choice for all the include folders. I also thought that he might have also noticed the discrepancy between \ used a path separator in the DEPENDPATH section (as well as line continuity) and / used in the HEADERS section. I hope that wysota agrees that you should use / to separate paths and \ as line continuation in qmake files. Or is this too many fish?

    Pete

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: I can't compile my program in windows!!

    I agree that patience is a virtue and I agree that trial & error and reading the docs can help much to prevent the loss of the virtue by people answering one's questions Definitely too many fish

  10. #10
    Join Date
    Aug 2007
    Posts
    64
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Red face Re: I can't compile my program in windows!!

    Thanks guys!!

    When I swap the DEPENDPATH to INCLUDEPATH the program compiled so well, but now I have another problem!!
    When I do a double click in the exe generated, a message is shown saying:

    This program couldn't be started cause mingwm10.dll wasn't found. The reinstall of application could solve this problem.

    but I have this dll in these directorys:

    c:\MinGW\bin
    c:\Qt\4.3.2\bin

    where should I put this dll? Should I reinstall MinGW?

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

    Default Re: I can't compile my program in windows!!

    Add a path to required dll to PATH environment variable.
    J-P Nurmi

  12. #12
    Join Date
    Aug 2007
    Posts
    64
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: I can't compile my program in windows!!

    ok, but...

    What's the name of file I should put the PATH variable?

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

    Default Re: I can't compile my program in windows!!

    When an application is launched, required DLLs (if any) are searched for in the current working directory and in paths listed in the PATH environment variable. Currently, as it says, mingwm10.dll cannot be found. So add "c:\MinGW\bin" to PATH so that it can be found.
    J-P Nurmi

Similar Threads

  1. Use VC2005 to compile Qt program (4.3.0)
    By firegun9 in forum Qt Programming
    Replies: 3
    Last Post: 8th June 2007, 16:04
  2. Porting my program to another windows machine !
    By probine in forum Qt Programming
    Replies: 1
    Last Post: 14th March 2007, 06:46
  3. QT MySQL
    By sabeeshcs in forum Newbie
    Replies: 6
    Last Post: 12th January 2007, 04:19
  4. Project won't compile under Windows (works under Linux)
    By philski in forum Qt Programming
    Replies: 7
    Last Post: 14th September 2006, 15:29
  5. Replies: 4
    Last Post: 12th January 2006, 04:16

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.