Results 1 to 6 of 6

Thread: nmake error during .pro compiling

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2007
    Location
    Italy
    Posts
    172
    Thanks
    39
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default nmake error during .pro compiling

    Hi,
    I tried to install Qt 4.4.0 under windows XP, I thought I did it in the right way but I'm not able to compile, for example, if I try to compile the project in "examples\dialogs\sipdialog\" I get this error:
    Qt Code:
    1. sipdialog.pro(6): fatal error U1001: syntax error: character '.' not valid in the marco
    To copy to clipboard, switch view to plain text mode 
    i compiled it with "nmake sipdialog.pro".
    Thanks so much!

    Qt Code:
    1. HEADERS = dialog.h
    2. SOURCES = main.cpp \
    3. dialog.cpp
    4.  
    5. # install
    6. target.path = $$[QT_INSTALL_EXAMPLES]/dialogs/sipdialog
    7. sources.files = $$SOURCES $$HEADERS *.pro
    8. sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/sipdialog
    9. INSTALLS += target sources
    10. wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
    To copy to clipboard, switch view to plain text mode 
    Last edited by mattia; 18th June 2008 at 08:49. Reason: attached .pro file

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

    Default Re: nmake error during .pro compiling

    Quote Originally Posted by mattia View Post
    i compiled it with "nmake sipdialog.pro".
    nmake doesn't handle qmake project files. Just generate a makefile with plain "qmake" first and then compile the project with "nmake".
    J-P Nurmi

  3. #3
    Join Date
    Oct 2007
    Location
    Italy
    Posts
    172
    Thanks
    39
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: nmake error during .pro compiling

    I tried to do as you advise me, and something is moving but i get this error now:
    Qt Code:
    1. D:\Qt\4.4.0\examples\dialogs\sipdialog>nmake
    2.  
    3. Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
    4. Copyright (C) Microsoft Corporation. All rights reserved.
    5.  
    6. "C:\Programmi\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" -f Makefile.
    7. Debug all
    8.  
    9. Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
    10. Copyright (C) Microsoft Corporation. All rights reserved.
    11.  
    12. g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_S
    13. UPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
    14. -I'../../../include/QtCore' -I'../../../include/QtCore' -I'../../../include/QtGu
    15. i' -I'../../../include/QtGui' -I'../../../include' -I'.' -I'd:/Qt/4.4.0/include/
    16. ActiveQt' -I'tmp/moc/debug_shared' -I'.' -I'../../../mkspecs/win32-g++' -o tmp/o
    17. bj/debug_shared/dialog.o dialog.cpp
    18. dialog.cpp:44:17: QtGui: No such file or directory
    19. In file included from dialog.cpp:46:
    20. dialog.h:47:19: QDialog: No such file or directory
    21. In file included from dialog.cpp:46:
    22. dialog.h:51: error: expected class-name before '{' token
    23. dialog.h:54: error: ISO C++ forbids declaration of `Q_OBJECT' with no type
    24. dialog.h:54: error: expected `;' before "public"
    25. dialog.h:59: error: `QRect' does not name a type
    26. dialog.h:61: error: expected `:' before "slots"
    27. dialog.h:62: error: expected primary-expression before "void"
    28. dialog.h:62: error: ISO C++ forbids declaration of `slots' with no type
    29. dialog.h:62: error: expected `;' before "void"
    30. dialog.cpp:50: error: definition of implicitly-declared `Dialog::Dialog()'
    31. dialog.cpp:50: error: declaration of `Dialog::Dialog()' throws different excepti
    32. ons
    33. dialog.h:51: error: than previous declaration `Dialog::Dialog() throw ()'
    34. dialog.cpp: In constructor `Dialog::Dialog()':
    35. dialog.cpp:51: error: `desktopGeometry' was not declared in this scope
    36. dialog.cpp:51: error: `QApplication' has not been declared
    37. dialog.cpp:51: error: `desktop' was not declared in this scope
    38. dialog.cpp:53: error: `tr' was not declared in this scope
    39. dialog.cpp:53: error: `setWindowTitle' was not declared in this scope
    40. dialog.cpp:54: error: `QScrollArea' was not declared in this scope
    41. dialog.cpp:54: error: `scrollArea' was not declared in this scope
    42. dialog.cpp:54: error: `QScrollArea' is not a type
    43. dialog.cpp:55: error: `QGroupBox' was not declared in this scope
    44. dialog.cpp:55: error: `groupBox' was not declared in this scope
    45. dialog.cpp:55: error: `QGroupBox' is not a type
    46. dialog.cpp:57: error: `QGridLayout' was not declared in this scope
    47. dialog.cpp:57: error: `gridLayout' was not declared in this scope
    48. dialog.cpp:57: error: `QGridLayout' is not a type
    49. dialog.cpp:62: error: `QLineEdit' was not declared in this scope
    50. dialog.cpp:62: error: `lineEdit' was not declared in this scope
    51. dialog.cpp:62: error: `QLineEdit' is not a type
    52. dialog.cpp:66: error: `QLabel' was not declared in this scope
    53. dialog.cpp:66: error: `label' was not declared in this scope
    54. dialog.cpp:66: error: `QLabel' is not a type
    55. dialog.cpp:70: error: `QPushButton' was not declared in this scope
    56. dialog.cpp:70: error: `button' was not declared in this scope
    57. dialog.cpp:70: error: `QPushButton' is not a type
    58. dialog.cpp:88: error: `QHBoxLayout' was not declared in this scope
    59. dialog.cpp:88: error: `layout' was not declared in this scope
    60. dialog.cpp:88: error: `QHBoxLayout' is not a type
    61. dialog.cpp:90: error: `setLayout' was not declared in this scope
    62. dialog.cpp:91: error: `Qt' has not been declared
    63. dialog.cpp:91: error: `ScrollBarAlwaysOff' was not declared in this scope
    64. dialog.cpp:95: error: `pressed' was not declared in this scope
    65. dialog.cpp:95: error: `SIGNAL' was not declared in this scope
    66. dialog.cpp:96: error: `qApp' was not declared in this scope
    67. dialog.cpp:96: error: `closeAllWindows' was not declared in this scope
    68. dialog.cpp:96: error: `SLOT' was not declared in this scope
    69. dialog.cpp:96: error: `connect' was not declared in this scope
    70. dialog.cpp:97: error: `QApplication' has not been declared
    71. dialog.cpp:97: error: expected primary-expression before "int"
    72. dialog.cpp:97: error: `workAreaResized' was not declared in this scope
    73. dialog.cpp:98: error: expected primary-expression before "int"
    74. dialog.cpp:98: error: `desktopResized' was not declared in this scope
    75. dialog.cpp:53: warning: unused variable 'setWindowTitle'
    76. dialog.cpp:54: warning: unused variable 'QScrollArea'
    77. dialog.cpp:55: warning: unused variable 'QGroupBox'
    78. dialog.cpp:57: warning: unused variable 'QGridLayout'
    79. dialog.cpp:62: warning: unused variable 'QLineEdit'
    80. dialog.cpp:66: warning: unused variable 'QLabel'
    81. dialog.cpp:70: warning: unused variable 'QPushButton'
    82. dialog.cpp:88: warning: unused variable 'QHBoxLayout'
    83. dialog.cpp:90: warning: unused variable 'setLayout'
    84. dialog.cpp:91: warning: unused variable 'ScrollBarAlwaysOff'
    85. dialog.cpp:95: warning: unused variable 'pressed'
    86. dialog.cpp:96: warning: unused variable 'qApp'
    87. dialog.cpp:96: warning: unused variable 'closeAllWindows'
    88. dialog.cpp:97: warning: unused variable 'workAreaResized'
    89. dialog.cpp:98: warning: unused variable 'desktopResized'
    90. dialog.cpp: At global scope:
    91. dialog.cpp:104: error: no `void Dialog::desktopResized(int)' member function dec
    92. lared in class `Dialog'
    93. dialog.cpp: In member function `void Dialog::reactToSIP()':
    94. dialog.cpp:114: error: `QRect' was not declared in this scope
    95. dialog.cpp:114: error: expected `;' before "availableGeometry"
    96. dialog.cpp:116: error: `desktopGeometry' was not declared in this scope
    97. dialog.cpp:116: error: `availableGeometry' was not declared in this scope
    98. dialog.cpp:118: error: `windowState' was not declared in this scope
    99. dialog.cpp:118: error: `Qt' has not been declared
    100. dialog.cpp:118: error: `WindowMaximized' was not declared in this scope
    101. dialog.cpp:118: error: `setWindowState' was not declared in this scope
    102. dialog.cpp:119: error: `setGeometry' was not declared in this scope
    103. dialog.cpp:118: warning: unused variable 'windowState'
    104. dialog.cpp:118: warning: unused variable 'WindowMaximized'
    105. dialog.cpp:118: warning: unused variable 'setWindowState'
    106. dialog.cpp:119: warning: unused variable 'setGeometry'
    107. dialog.cpp:121: error: `windowState' was not declared in this scope
    108. dialog.cpp:121: error: `Qt' has not been declared
    109. dialog.cpp:121: error: `WindowMaximized' was not declared in this scope
    110. dialog.cpp:121: error: `setWindowState' was not declared in this scope
    111. dialog.cpp:121: warning: unused variable 'windowState'
    112. dialog.cpp:121: warning: unused variable 'WindowMaximized'
    113. dialog.cpp:121: warning: unused variable 'setWindowState'
    114. dialog.cpp:124: error: `desktopGeometry' was not declared in this scope
    115. dialog.cpp:124: error: `availableGeometry' was not declared in this scope
    116. dialog.cpp:114: warning: unused variable 'QRect'
    117. dialog.cpp:124: warning: unused variable 'desktopGeometry'
    118. dialog.cpp:124: warning: unused variable 'availableGeometry'
    119. NMAKE : fatal error U1077: 'C:\MinGW\bin\g++.EXE' : return code '0x1'
    120. Stop.
    121. NMAKE : fatal error U1077: '"C:\Programmi\Microsoft Visual Studio 9.0\VC\BIN\nma
    122. ke.exe"' : return code '0x2'
    123. Stop.
    To copy to clipboard, switch view to plain text mode 
    i think, it's a installation problem...how can i fix it? Is there a manual about how to install Qt under win?
    Regards,

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

    Default Re: nmake error during .pro compiling

    Your Qt installation is for MinGW. You cannot use it with Visual Studio just like that. You have to download the source package of Qt and compile it yourself for Visual Studio.


    See also Installing Qt/Windows and [WIKI]Qt4 with Visual Studio[/WIKI].
    J-P Nurmi

  5. #5
    Join Date
    Oct 2007
    Location
    Italy
    Posts
    172
    Thanks
    39
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: nmake error during .pro compiling

    i compiled Qt library as in:
    http://doc.trolltech.com/4.4/install-win.html
    with:
    Qt Code:
    1. D:
    2. cd \Qt\4.4.0
    3. configure
    To copy to clipboard, switch view to plain text mode 
    i was looking how to configure VS here:
    http://wiki.qtcentre.org/index.php?t..._Visual_Studio
    and I'm not able to understand where to find qconfigure script:
    When you have decided about which options to use, call the qconfigure script that was created by the ACS patch. The script accepts the version of your Visual Studio following by any set of the configure options you want to be active.
    Do i need to download a patch? i'm using Qt 4.4.0

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

    Default Re: nmake error during .pro compiling

    Quote Originally Posted by mattia View Post
    and I'm not able to understand where to find qconfigure script
    Use "configure".

    Do i need to download a patch? i'm using Qt 4.4.0
    No, as the article says, it's no more needed for Qt versions 4.3.2 and greater.
    J-P Nurmi

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.