Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to fix an error message when trying to emit errors (instead of warnings) for using deprecated Qt features?
Forum Updated to NodeBB v4.3 + New Features

How to fix an error message when trying to emit errors (instead of warnings) for using deprecated Qt features?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 585 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    beginner123
    wrote on last edited by
    #1

    I have an old project written in Qt 5.14.0 several years ago. In preparation of upgrading to Qt 6, I downloaded the Qt 5.15.2 and updated my scripts accordingly. It worked properly until I disabled the use of deprecated features in Qt 5.15. In my old scripts, I had this line in the project's .pro file :

    DEFINES += QT_DEPRECATED_WARNINGS

    This line was meant to emit warns if any deprecated features were used. My scripts ran smoothly with this line in the .pro file. With an attempt to emit errors (instead of warnings), I commented out this line and replaced it with a new line:

    DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x050F00

    However, such a change introduced an error message, that says "[Makefile.Release:922: release/CWav.o] Error 1". For clarity, here is the Compile Output that shows all details of the error message:

    ==== Beginning of the Error Message ====
    13:32:03: Running steps for project MotherVoice...
    13:32:03: Starting: "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" clean -j8
    C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -o Makefile ....\MotherVoice.pro -spec win32-g++ "CONFIG+=qtquickcompiler"
    C:/Qt/Tools/mingw810_64/bin/mingw32-make -f Makefile.Release clean
    C:/Qt/Tools/mingw810_64/bin/mingw32-make -f Makefile.Debug clean
    mingw32-make[1]: Entering directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
    del release\moc_predefs.h
    mingw32-make[1]: Entering directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
    del debug\moc_predefs.h
    del release\moc_subjectwindow.cpp release\moc_mainwindow.cpp
    del debug\moc_subjectwindow.cpp debug\moc_mainwindow.cpp
    Could Not Find C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release\debug\moc_predefs.h
    Could Not Find C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release\debug\moc_subjectwindow.cpp
    del debug\CWav.o debug\entryMotherVoice.o debug\main.o debug\subjectwindow.o debug\mainwindow.o debug\FuhClasses.o debug\dataMotherVoice.o debug\recordMotherVoice.o debug\moc_subjectwindow.o debug\moc_mainwindow.o
    del release\CWav.o release\entryMotherVoice.o release\main.o release\subjectwindow.o release\mainwindow.o release\FuhClasses.o release\dataMotherVoice.o release\recordMotherVoice.o release\moc_subjectwindow.o release\moc_mainwindow.o
    Could Not Find C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release\debug\CWav.o
    del debug\MotherVoice_resource_res.o
    del release\MotherVoice_resource_res.o
    Could Not Find C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release\debug\MotherVoice_resource_res.o
    mingw32-make[1]: Leaving directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
    mingw32-make[1]: Leaving directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
    13:32:14: The process "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" exited normally.
    13:32:14: Starting: "C:\Qt\5.15.2\mingw81_64\bin\qmake.exe" "C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\MotherVoice.pro" -spec win32-g++ "CONFIG+=qtquickcompiler"
    13:32:17: The process "C:\Qt\5.15.2\mingw81_64\bin\qmake.exe" exited normally.
    13:32:17: Starting: "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" -f "C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release/Makefile" qmake_all
    mingw32-make: Nothing to be done for 'qmake_all'.
    13:32:17: The process "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" exited normally.
    13:32:17: Starting: "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" -j8
    C:/Qt/Tools/mingw810_64/bin/mingw32-make -f Makefile.Release
    mingw32-make[1]: Entering directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
    g++ -c -fno-keep-inline-dllexport -O2 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DISABLE_DEPRECATED_UP_TO -D= -D0x050F00 -DQT_NO_DEBUG -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I......\v010_remove_deprecated_features -I. -I........\FuhClasses -I"C:\Fuh\OneDrive\QtPrograms\xResources\FFTReal\v2.00" -I"C:\Fuh\OneDrive\QtPrograms\xResources\imageFiles" -IC:\Qt\5.15.2\mingw81_64\include -IC:\Qt\5.15.2\mingw81_64\include\QtCharts -IC:\Qt\5.15.2\mingw81_64\include\QtWidgets -IC:\Qt\5.15.2\mingw81_64\include\QtMultimedia -IC:\Qt\5.15.2\mingw81_64\include\QtGui -IC:\Qt\5.15.2\mingw81_64\include\QtANGLE -IC:\Qt\5.15.2\mingw81_64\include\QtNetwork -IC:\Qt\5.15.2\mingw81_64\include\QtCore -Irelease -I/include -IC:\Qt\5.15.2\mingw81_64\mkspecs\win32-g++ -o release\CWav.o ........\FuhClasses\CWav.cpp
    <command-line>: error: no macro name given in #define directive
    <command-line>: error: macro names must be identifiers
    g++ -c -fno-keep-inline-dllexport -O2 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DISABLE_DEPRECATED_UP_TO -D= -D0x050F00 -DQT_NO_DEBUG -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I......\v010_remove_deprecated_features -I. -I........\FuhClasses -I"C:\Fuh\OneDrive\QtPrograms\xResources\FFTReal\v2.00" -I"C:\Fuh\OneDrive\QtPrograms\xResources\imageFiles" -IC:\Qt\5.15.2\mingw81_64\include -IC:\Qt\5.15.2\mingw81_64\include\QtCharts -IC:\Qt\5.15.2\mingw81_64\include\QtWidgets -IC:\Qt\5.15.2\mingw81_64\include\QtMultimedia -IC:\Qt\5.15.2\mingw81_64\include\QtGui -IC:\Qt\5.15.2\mingw81_64\include\QtANGLE -IC:\Qt\5.15.2\mingw81_64\include\QtNetwork -IC:\Qt\5.15.2\mingw81_64\include\QtCore -Irelease -I/include -IC:\Qt\5.15.2\mingw81_64\mkspecs\win32-g++ -o release\entryMotherVoice.o ........\FuhClasses\entryMotherVoice.cpp
    <command-line>: error: no macro name given in #define directive
    <command-line>: error: macro names must be identifiers
    mingw32-make[1]: *** [Makefile.Release:922: release/CWav.o] Error 1
    mingw32-make[1]: *** Waiting for unfinished jobs....
    mingw32-make[1]: *** [Makefile.Release:1125: release/entryMotherVoice.o] Error 1
    mingw32-make[1]: Leaving directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
    mingw32-make: *** [Makefile:45: release] Error 2
    13:32:19: The process "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project MotherVoice (kit: Desktop Qt 5.15.2 MinGW 64-bit)
    When executing step "Make"
    13:32:20: Elapsed time: 00:16.
    ==== End of the Error Message ====

    What happened? What should I do to fix this?

    Any comments will be appreciated!

    Christian EhrlicherC 1 Reply Last reply
    0
    • B beginner123

      I have an old project written in Qt 5.14.0 several years ago. In preparation of upgrading to Qt 6, I downloaded the Qt 5.15.2 and updated my scripts accordingly. It worked properly until I disabled the use of deprecated features in Qt 5.15. In my old scripts, I had this line in the project's .pro file :

      DEFINES += QT_DEPRECATED_WARNINGS

      This line was meant to emit warns if any deprecated features were used. My scripts ran smoothly with this line in the .pro file. With an attempt to emit errors (instead of warnings), I commented out this line and replaced it with a new line:

      DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x050F00

      However, such a change introduced an error message, that says "[Makefile.Release:922: release/CWav.o] Error 1". For clarity, here is the Compile Output that shows all details of the error message:

      ==== Beginning of the Error Message ====
      13:32:03: Running steps for project MotherVoice...
      13:32:03: Starting: "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" clean -j8
      C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -o Makefile ....\MotherVoice.pro -spec win32-g++ "CONFIG+=qtquickcompiler"
      C:/Qt/Tools/mingw810_64/bin/mingw32-make -f Makefile.Release clean
      C:/Qt/Tools/mingw810_64/bin/mingw32-make -f Makefile.Debug clean
      mingw32-make[1]: Entering directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
      del release\moc_predefs.h
      mingw32-make[1]: Entering directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
      del debug\moc_predefs.h
      del release\moc_subjectwindow.cpp release\moc_mainwindow.cpp
      del debug\moc_subjectwindow.cpp debug\moc_mainwindow.cpp
      Could Not Find C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release\debug\moc_predefs.h
      Could Not Find C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release\debug\moc_subjectwindow.cpp
      del debug\CWav.o debug\entryMotherVoice.o debug\main.o debug\subjectwindow.o debug\mainwindow.o debug\FuhClasses.o debug\dataMotherVoice.o debug\recordMotherVoice.o debug\moc_subjectwindow.o debug\moc_mainwindow.o
      del release\CWav.o release\entryMotherVoice.o release\main.o release\subjectwindow.o release\mainwindow.o release\FuhClasses.o release\dataMotherVoice.o release\recordMotherVoice.o release\moc_subjectwindow.o release\moc_mainwindow.o
      Could Not Find C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release\debug\CWav.o
      del debug\MotherVoice_resource_res.o
      del release\MotherVoice_resource_res.o
      Could Not Find C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release\debug\MotherVoice_resource_res.o
      mingw32-make[1]: Leaving directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
      mingw32-make[1]: Leaving directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
      13:32:14: The process "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" exited normally.
      13:32:14: Starting: "C:\Qt\5.15.2\mingw81_64\bin\qmake.exe" "C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\MotherVoice.pro" -spec win32-g++ "CONFIG+=qtquickcompiler"
      13:32:17: The process "C:\Qt\5.15.2\mingw81_64\bin\qmake.exe" exited normally.
      13:32:17: Starting: "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" -f "C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release/Makefile" qmake_all
      mingw32-make: Nothing to be done for 'qmake_all'.
      13:32:17: The process "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" exited normally.
      13:32:17: Starting: "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" -j8
      C:/Qt/Tools/mingw810_64/bin/mingw32-make -f Makefile.Release
      mingw32-make[1]: Entering directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
      g++ -c -fno-keep-inline-dllexport -O2 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DISABLE_DEPRECATED_UP_TO -D= -D0x050F00 -DQT_NO_DEBUG -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I......\v010_remove_deprecated_features -I. -I........\FuhClasses -I"C:\Fuh\OneDrive\QtPrograms\xResources\FFTReal\v2.00" -I"C:\Fuh\OneDrive\QtPrograms\xResources\imageFiles" -IC:\Qt\5.15.2\mingw81_64\include -IC:\Qt\5.15.2\mingw81_64\include\QtCharts -IC:\Qt\5.15.2\mingw81_64\include\QtWidgets -IC:\Qt\5.15.2\mingw81_64\include\QtMultimedia -IC:\Qt\5.15.2\mingw81_64\include\QtGui -IC:\Qt\5.15.2\mingw81_64\include\QtANGLE -IC:\Qt\5.15.2\mingw81_64\include\QtNetwork -IC:\Qt\5.15.2\mingw81_64\include\QtCore -Irelease -I/include -IC:\Qt\5.15.2\mingw81_64\mkspecs\win32-g++ -o release\CWav.o ........\FuhClasses\CWav.cpp
      <command-line>: error: no macro name given in #define directive
      <command-line>: error: macro names must be identifiers
      g++ -c -fno-keep-inline-dllexport -O2 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DISABLE_DEPRECATED_UP_TO -D= -D0x050F00 -DQT_NO_DEBUG -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I......\v010_remove_deprecated_features -I. -I........\FuhClasses -I"C:\Fuh\OneDrive\QtPrograms\xResources\FFTReal\v2.00" -I"C:\Fuh\OneDrive\QtPrograms\xResources\imageFiles" -IC:\Qt\5.15.2\mingw81_64\include -IC:\Qt\5.15.2\mingw81_64\include\QtCharts -IC:\Qt\5.15.2\mingw81_64\include\QtWidgets -IC:\Qt\5.15.2\mingw81_64\include\QtMultimedia -IC:\Qt\5.15.2\mingw81_64\include\QtGui -IC:\Qt\5.15.2\mingw81_64\include\QtANGLE -IC:\Qt\5.15.2\mingw81_64\include\QtNetwork -IC:\Qt\5.15.2\mingw81_64\include\QtCore -Irelease -I/include -IC:\Qt\5.15.2\mingw81_64\mkspecs\win32-g++ -o release\entryMotherVoice.o ........\FuhClasses\entryMotherVoice.cpp
      <command-line>: error: no macro name given in #define directive
      <command-line>: error: macro names must be identifiers
      mingw32-make[1]: *** [Makefile.Release:922: release/CWav.o] Error 1
      mingw32-make[1]: *** Waiting for unfinished jobs....
      mingw32-make[1]: *** [Makefile.Release:1125: release/entryMotherVoice.o] Error 1
      mingw32-make[1]: Leaving directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
      mingw32-make: *** [Makefile:45: release] Error 2
      13:32:19: The process "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" exited with code 2.
      Error while building/deploying project MotherVoice (kit: Desktop Qt 5.15.2 MinGW 64-bit)
      When executing step "Make"
      13:32:20: Elapsed time: 00:16.
      ==== End of the Error Message ====

      What happened? What should I do to fix this?

      Any comments will be appreciated!

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #3

      @beginner123 said in How to fix an error message when trying to emit errors (instead of warnings) for using deprecated Qt features?:

      -DQT_DISABLE_DEPRECATED_UP_TO -D= -D0x050F00

      As you can see it's interpreted as two parameters.
      Try to enclose them with "
      --> DEFINES += "QT_DISABLE_DEPRECATED_UP_TO=0x050F00"

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      B 1 Reply Last reply
      3
      • A Offline
        A Offline
        ankou29666
        wrote on last edited by
        #2

        Hi

        Would be great you highlight (using bold or color) all the lines that are related to the error.

        the third occurence to "CWav.o" is

        Could Not Find C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release\debug\CWav.o
        

        What is surprizing is this it complains about a file that's been deleted right the previous line.

        1 Reply Last reply
        1
        • B beginner123

          I have an old project written in Qt 5.14.0 several years ago. In preparation of upgrading to Qt 6, I downloaded the Qt 5.15.2 and updated my scripts accordingly. It worked properly until I disabled the use of deprecated features in Qt 5.15. In my old scripts, I had this line in the project's .pro file :

          DEFINES += QT_DEPRECATED_WARNINGS

          This line was meant to emit warns if any deprecated features were used. My scripts ran smoothly with this line in the .pro file. With an attempt to emit errors (instead of warnings), I commented out this line and replaced it with a new line:

          DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x050F00

          However, such a change introduced an error message, that says "[Makefile.Release:922: release/CWav.o] Error 1". For clarity, here is the Compile Output that shows all details of the error message:

          ==== Beginning of the Error Message ====
          13:32:03: Running steps for project MotherVoice...
          13:32:03: Starting: "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" clean -j8
          C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -o Makefile ....\MotherVoice.pro -spec win32-g++ "CONFIG+=qtquickcompiler"
          C:/Qt/Tools/mingw810_64/bin/mingw32-make -f Makefile.Release clean
          C:/Qt/Tools/mingw810_64/bin/mingw32-make -f Makefile.Debug clean
          mingw32-make[1]: Entering directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
          del release\moc_predefs.h
          mingw32-make[1]: Entering directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
          del debug\moc_predefs.h
          del release\moc_subjectwindow.cpp release\moc_mainwindow.cpp
          del debug\moc_subjectwindow.cpp debug\moc_mainwindow.cpp
          Could Not Find C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release\debug\moc_predefs.h
          Could Not Find C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release\debug\moc_subjectwindow.cpp
          del debug\CWav.o debug\entryMotherVoice.o debug\main.o debug\subjectwindow.o debug\mainwindow.o debug\FuhClasses.o debug\dataMotherVoice.o debug\recordMotherVoice.o debug\moc_subjectwindow.o debug\moc_mainwindow.o
          del release\CWav.o release\entryMotherVoice.o release\main.o release\subjectwindow.o release\mainwindow.o release\FuhClasses.o release\dataMotherVoice.o release\recordMotherVoice.o release\moc_subjectwindow.o release\moc_mainwindow.o
          Could Not Find C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release\debug\CWav.o
          del debug\MotherVoice_resource_res.o
          del release\MotherVoice_resource_res.o
          Could Not Find C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release\debug\MotherVoice_resource_res.o
          mingw32-make[1]: Leaving directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
          mingw32-make[1]: Leaving directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
          13:32:14: The process "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" exited normally.
          13:32:14: Starting: "C:\Qt\5.15.2\mingw81_64\bin\qmake.exe" "C:\Fuh\OneDrive\QtPrograms\Qt_Jeng\MotherVoice\v010_remove_deprecated_features\MotherVoice.pro" -spec win32-g++ "CONFIG+=qtquickcompiler"
          13:32:17: The process "C:\Qt\5.15.2\mingw81_64\bin\qmake.exe" exited normally.
          13:32:17: Starting: "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" -f "C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release/Makefile" qmake_all
          mingw32-make: Nothing to be done for 'qmake_all'.
          13:32:17: The process "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" exited normally.
          13:32:17: Starting: "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" -j8
          C:/Qt/Tools/mingw810_64/bin/mingw32-make -f Makefile.Release
          mingw32-make[1]: Entering directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
          g++ -c -fno-keep-inline-dllexport -O2 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DISABLE_DEPRECATED_UP_TO -D= -D0x050F00 -DQT_NO_DEBUG -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I......\v010_remove_deprecated_features -I. -I........\FuhClasses -I"C:\Fuh\OneDrive\QtPrograms\xResources\FFTReal\v2.00" -I"C:\Fuh\OneDrive\QtPrograms\xResources\imageFiles" -IC:\Qt\5.15.2\mingw81_64\include -IC:\Qt\5.15.2\mingw81_64\include\QtCharts -IC:\Qt\5.15.2\mingw81_64\include\QtWidgets -IC:\Qt\5.15.2\mingw81_64\include\QtMultimedia -IC:\Qt\5.15.2\mingw81_64\include\QtGui -IC:\Qt\5.15.2\mingw81_64\include\QtANGLE -IC:\Qt\5.15.2\mingw81_64\include\QtNetwork -IC:\Qt\5.15.2\mingw81_64\include\QtCore -Irelease -I/include -IC:\Qt\5.15.2\mingw81_64\mkspecs\win32-g++ -o release\CWav.o ........\FuhClasses\CWav.cpp
          <command-line>: error: no macro name given in #define directive
          <command-line>: error: macro names must be identifiers
          g++ -c -fno-keep-inline-dllexport -O2 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DISABLE_DEPRECATED_UP_TO -D= -D0x050F00 -DQT_NO_DEBUG -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I......\v010_remove_deprecated_features -I. -I........\FuhClasses -I"C:\Fuh\OneDrive\QtPrograms\xResources\FFTReal\v2.00" -I"C:\Fuh\OneDrive\QtPrograms\xResources\imageFiles" -IC:\Qt\5.15.2\mingw81_64\include -IC:\Qt\5.15.2\mingw81_64\include\QtCharts -IC:\Qt\5.15.2\mingw81_64\include\QtWidgets -IC:\Qt\5.15.2\mingw81_64\include\QtMultimedia -IC:\Qt\5.15.2\mingw81_64\include\QtGui -IC:\Qt\5.15.2\mingw81_64\include\QtANGLE -IC:\Qt\5.15.2\mingw81_64\include\QtNetwork -IC:\Qt\5.15.2\mingw81_64\include\QtCore -Irelease -I/include -IC:\Qt\5.15.2\mingw81_64\mkspecs\win32-g++ -o release\entryMotherVoice.o ........\FuhClasses\entryMotherVoice.cpp
          <command-line>: error: no macro name given in #define directive
          <command-line>: error: macro names must be identifiers
          mingw32-make[1]: *** [Makefile.Release:922: release/CWav.o] Error 1
          mingw32-make[1]: *** Waiting for unfinished jobs....
          mingw32-make[1]: *** [Makefile.Release:1125: release/entryMotherVoice.o] Error 1
          mingw32-make[1]: Leaving directory 'C:/Fuh/OneDrive/QtPrograms/Qt_Jeng/MotherVoice/v010_remove_deprecated_features/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release'
          mingw32-make: *** [Makefile:45: release] Error 2
          13:32:19: The process "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" exited with code 2.
          Error while building/deploying project MotherVoice (kit: Desktop Qt 5.15.2 MinGW 64-bit)
          When executing step "Make"
          13:32:20: Elapsed time: 00:16.
          ==== End of the Error Message ====

          What happened? What should I do to fix this?

          Any comments will be appreciated!

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #3

          @beginner123 said in How to fix an error message when trying to emit errors (instead of warnings) for using deprecated Qt features?:

          -DQT_DISABLE_DEPRECATED_UP_TO -D= -D0x050F00

          As you can see it's interpreted as two parameters.
          Try to enclose them with "
          --> DEFINES += "QT_DISABLE_DEPRECATED_UP_TO=0x050F00"

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          B 1 Reply Last reply
          3
          • Christian EhrlicherC Christian Ehrlicher

            @beginner123 said in How to fix an error message when trying to emit errors (instead of warnings) for using deprecated Qt features?:

            -DQT_DISABLE_DEPRECATED_UP_TO -D= -D0x050F00

            As you can see it's interpreted as two parameters.
            Try to enclose them with "
            --> DEFINES += "QT_DISABLE_DEPRECATED_UP_TO=0x050F00"

            B Offline
            B Offline
            beginner123
            wrote on last edited by
            #4

            @Christian-Ehrlicher

            WOW! That fixed the problem. Thank you SO MUCH!!!

            1 Reply Last reply
            0
            • B beginner123 has marked this topic as solved on
            • B beginner123 has marked this topic as solved on

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved