Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [SOLVED]Qt Creator issue: The .pro file could not be parsed !

[SOLVED]Qt Creator issue: The .pro file could not be parsed !

Scheduled Pinned Locked Moved Qt Creator and other tools
15 Posts 3 Posters 21.4k Views
  • 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.
  • M Offline
    M Offline
    mbnoimi
    wrote on last edited by
    #1

    I've created a project with subdirectories as following but it gives me an error message for one of them

    core project: "The .pro file could not be parsed"

    How can I fix this issue?

    ------ IbnZuhr.pro ------

    @TEMPLATE = subdirs
    CONFIG += ordered
    SUBDIRS +=
    csv
    fft
    ysom
    core \

    win32 {
    SUBDIRS += qwt
    }@

    ------ core.pro ------

    @#-------------------------------------------------

    Project created by QtCreator 2012-03-10T23:38:33

    #-------------------------------------------------

    QT += core gui sql
    DESTDIR = ../../bin
    TEMPLATE = app
    MOC_DIR += moc
    OBJECTS_DIR += obj
    RCC_DIR += rcc

    SOURCES += main.cpp
    mainwindow.cpp
    aboutdialog.cpp
    dialogpersons.cpp
    wizardaddreflection.cpp
    extractfeatures.cpp

    HEADERS += mainwindow.h
    aboutdialog.h
    dialogpersons.h
    wizardaddreflection.h
    extractfeatures.h
    ../fft/fft.h
    ../fft/complex.h
    ../ysom/ysom.h
    ../csv/csv.h \

    FORMS += mainwindow.ui
    aboutdialog.ui
    dialogpersons.ui
    wizardaddreflection.ui

    INCLUDEPATH += ../ysom
    ../csv
    ../fft

    TRANSLATIONS += ./l10n/ar.ts
    ./l10n/en.ts

    RESOURCES +=
    res.qrc

    OTHER_FILES +=
    l10n/en.ts
    l10n/ar.ts
    images/style.css \

    win32 {
    TARGET = IbnZuhr-win32
    HEADERS += ../qwt/src/qwt_wheel.h
    ../qwt/src/qwt_thermo.h
    ../qwt/src/qwt_text_label.h
    ../qwt/src/qwt_text_engine.h
    ../qwt/src/qwt_text.h
    ../qwt/src/qwt_system_clock.h
    ../qwt/src/qwt_symbol.h
    ../qwt/src/qwt_spline.h
    ../qwt/src/qwt_slider.h
    ../qwt/src/qwt_series_data.h
    ../qwt/src/qwt_scale_widget.h
    ../qwt/src/qwt_scale_map.h
    ../qwt/src/qwt_scale_engine.h
    ../qwt/src/qwt_scale_draw.h
    ../qwt/src/qwt_scale_div.h
    ../qwt/src/qwt_sampling_thread.h
    ../qwt/src/qwt_round_scale_draw.h
    ../qwt/src/qwt_raster_data.h
    ../qwt/src/qwt_point_polar.h
    ../qwt/src/qwt_point_3d.h
    ../qwt/src/qwt_plot_zoomer.h
    ../qwt/src/qwt_plot_svgitem.h
    ../qwt/src/qwt_plot_spectrogram.h
    ../qwt/src/qwt_plot_spectrocurve.h
    ../qwt/src/qwt_plot_seriesitem.h
    ../qwt/src/qwt_plot_scaleitem.h
    ../qwt/src/qwt_plot_rescaler.h
    ../qwt/src/qwt_plot_renderer.h
    ../qwt/src/qwt_plot_rasteritem.h
    ../qwt/src/qwt_plot_picker.h
    ../qwt/src/qwt_plot_panner.h
    ../qwt/src/qwt_plot_marker.h
    ../qwt/src/qwt_plot_magnifier.h
    ../qwt/src/qwt_plot_layout.h
    ../qwt/src/qwt_plot_item.h
    ../qwt/src/qwt_plot_intervalcurve.h
    ../qwt/src/qwt_plot_histogram.h
    ../qwt/src/qwt_plot_grid.h
    ../qwt/src/qwt_plot_directpainter.h
    ../qwt/src/qwt_plot_dict.h
    ../qwt/src/qwt_plot_curve.h
    ../qwt/src/qwt_plot_canvas.h
    ../qwt/src/qwt_plot.h
    ../qwt/src/qwt_picker_machine.h
    ../qwt/src/qwt_picker.h
    ../qwt/src/qwt_panner.h
    ../qwt/src/qwt_painter.h
    ../qwt/src/qwt_null_paintdevice.h
    ../qwt/src/qwt_matrix_raster_data.h
    ../qwt/src/qwt_math.h
    ../qwt/src/qwt_magnifier.h
    ../qwt/src/qwt_legend_itemmanager.h
    ../qwt/src/qwt_legend_item.h
    ../qwt/src/qwt_legend.h
    ../qwt/src/qwt_knob.h
    ../qwt/src/qwt_interval_symbol.h
    ../qwt/src/qwt_interval.h
    ../qwt/src/qwt_global.h
    ../qwt/src/qwt_event_pattern.h
    ../qwt/src/qwt_dyngrid_layout.h
    ../qwt/src/qwt_double_range.h
    ../qwt/src/qwt_dial_needle.h
    ../qwt/src/qwt_dial.h
    ../qwt/src/qwt_curve_fitter.h
    ../qwt/src/qwt_counter.h
    ../qwt/src/qwt_compat.h
    ../qwt/src/qwt_compass_rose.h
    ../qwt/src/qwt_compass.h
    ../qwt/src/qwt_column_symbol.h
    ../qwt/src/qwt_color_map.h
    ../qwt/src/qwt_clipper.h
    ../qwt/src/qwt_arrow_button.h
    ../qwt/src/qwt_analog_clock.h
    ../qwt/src/qwt_abstract_slider.h
    ../qwt/src/qwt_abstract_scale_draw.h
    ../qwt/src/qwt_abstract_scale.h
    ../qwt/src/qwt.h \

    LIBS += ../ysom/lib/libysom-win32.a \
            ../csv/lib/libcsv-win32.a \
            ../fft/lib/libfft-win32.a
            ../qwt/lib/libqwt.a \
            ../qwt/lib/libqwtmathml.a \
    
    
    INCLUDEPATH += ../qwt/src \
    

    }
    unix {
    TARGET = IbnZuhr-linux

    DEPENDPATH += /usr/lib
    
    INCLUDEPATH += /usr/include/qwt \
    
    LIBS += ../ysom/lib/libysom-linux.a \
        ../csv/lib/libcsv-linux.a \
        ../fft/lib/libfft-linux.a \
        /usr/lib/libqwt.so
    

    }
    @

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbnoimi
      wrote on last edited by
      #2

      ------ csv.pro ------

      @#-------------------------------------------------

      Project created by QtCreator 2012-03-29T01:01:13

      #-------------------------------------------------

      #QT -= gui

      TEMPLATE = lib
      CONFIG += staticlib release
      DESTDIR = lib
      MOC_DIR += moc
      OBJECTS_DIR += obj
      RCC_DIR += rcc
      win32 {
      TARGET = csv-win32
      }
      unix {
      TARGET = csv-linux
      }
      debug {
      CONFIG += console
      }

      !exists( main.cpp ) {

      error( "No main.cpp file found" )

      }

      SOURCES += csv.cpp
      HEADERS += csv.h
      @

      ------ fft.pro ------

      @#-------------------------------------------------

      Project created by QtCreator 2012-03-30T22:18:46

      #-------------------------------------------------

      QT -= gui
      DESTDIR = lib
      TEMPLATE = lib
      CONFIG += staticlib release
      #TEMPLATE = app
      #CONFIG += console
      MOC_DIR += moc
      OBJECTS_DIR += obj
      RCC_DIR += rcc
      win32 {
      TARGET = fft-win32
      }
      unix {
      TARGET = fft-linux
      }
      debug {
      CONFIG += console
      }

      !exists( main.cpp ) {

      error( "No main.cpp file found" )

      }

      SOURCES +=
      fft.cpp
      complex.cpp
      main.cpp

      HEADERS += fft.h
      complex.h
      @

      ------ ysom.pro ------

      @QT -= gui
      DESTDIR = lib
      TEMPLATE = lib
      CONFIG += staticlib release
      MOC_DIR += moc
      OBJECTS_DIR += obj
      RCC_DIR += rcc
      win32 {
      TARGET = ysom-win32
      }
      unix {
      TARGET = ysom-linux
      }
      debug {
      CONFIG += console
      }

      !exists( main.cpp ) {

      error( "No main.cpp file found" )

      }

      SOURCES +=ysom.cpp
      HEADERS += ysom.h@

      ------ qwt.pro ------

      @################################################################

      Qwt Widget Library

      Copyright (C) 1997 Josef Wilgen

      Copyright (C) 2002 Uwe Rathmann

      This library is free software; you can redistribute it and/or

      modify it under the terms of the Qwt License, Version 1.0

      ################################################################

      include( qwtconfig.pri )

      TEMPLATE = subdirs
      CONFIG += ordered

      SUBDIRS =
      src
      textengines

      contains(QWT_CONFIG, QwtDesigner ) {
      SUBDIRS += designer
      }

      contains(QWT_CONFIG, QwtExamples ) {
      SUBDIRS += examples
      }

      qwtspec.files = qwtconfig.pri qwt.prf
      qwtspec.path = $${QWT_INSTALL_FEATURES}

      INSTALLS += qwtspec@

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        The first step is to determine wich .pro file causes the error.

        Open a console, go to the respective subdirectory and call qmake manually. It should print the errors, if there are any. Alternatively, you can open the .pro file in Qt Creator.

        Then, after knowing the offending .pro file, you can look what's wrong with that.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mbnoimi
          wrote on last edited by
          #4

          [quote author="Volker" date="1335091843"]after knowing the offending .pro file, you can look what's wrong with that.[/quote]

          I mentioned above which .pro has the error (core.pro)

          bq. core project: “The .pro file could not be parsed”

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #5

            Sorry, I had overlooked that. In that case, have a look at the compiler output pane in Creator if there are some detailed error messages. If not, comment out everything in the .pro file. Then add one line/part after another, rerun qmake and chek if the error returns. You then know the offending part of the file.

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mbnoimi
              wrote on last edited by
              #6

              [quote author="Volker" date="1335093648"]Sorry, I had overlooked that. In that case, have a look at the compiler output pane in Creator if there are some detailed error messages. If not, comment out everything in the .pro file. Then add one line/part after another, rerun qmake and chek if the error returns. You then know the offending part of the file.[/quote]

              Building process done correctly although error message appears but because of this error auto-completion & run of core.pro don't work correctly.

              This issue fixed when I commented win32 blocks in core.pro as following... what's wrong here?

              @QT += core gui sql
              DESTDIR = ../../bin
              TEMPLATE = app
              MOC_DIR += moc
              OBJECTS_DIR += obj
              RCC_DIR += rcc

              SOURCES += main.cpp
              mainwindow.cpp
              aboutdialog.cpp
              dialogpersons.cpp
              wizardaddreflection.cpp
              extractfeatures.cpp

              HEADERS += mainwindow.h
              aboutdialog.h
              dialogpersons.h
              wizardaddreflection.h
              extractfeatures.h
              ../fft/fft.h
              ../fft/complex.h
              ../ysom/ysom.h
              ../csv/csv.h \

              FORMS += mainwindow.ui
              aboutdialog.ui
              dialogpersons.ui
              wizardaddreflection.ui

              INCLUDEPATH += ../ysom
              ../csv
              ../fft

              TRANSLATIONS += ./l10n/ar.ts
              ./l10n/en.ts

              RESOURCES +=
              res.qrc

              OTHER_FILES +=
              l10n/en.ts
              l10n/ar.ts
              images/style.css \

              #win32 {

              TARGET = IbnZuhr-win32

              HEADERS += ../qwt/src/qwt_wheel.h \

              ../qwt/src/qwt_thermo.h \

              ../qwt/src/qwt_text_label.h \

              ../qwt/src/qwt_text_engine.h \

              ../qwt/src/qwt_text.h \

              ../qwt/src/qwt_system_clock.h \

              ../qwt/src/qwt_symbol.h \

              ../qwt/src/qwt_spline.h \

              ../qwt/src/qwt_slider.h \

              ../qwt/src/qwt_series_data.h \

              ../qwt/src/qwt_scale_widget.h \

              ../qwt/src/qwt_scale_map.h \

              ../qwt/src/qwt_scale_engine.h \

              ../qwt/src/qwt_scale_draw.h \

              ../qwt/src/qwt_scale_div.h \

              ../qwt/src/qwt_sampling_thread.h \

              ../qwt/src/qwt_round_scale_draw.h \

              ../qwt/src/qwt_raster_data.h \

              ../qwt/src/qwt_point_polar.h \

              ../qwt/src/qwt_point_3d.h \

              ../qwt/src/qwt_plot_zoomer.h \

              ../qwt/src/qwt_plot_svgitem.h \

              ../qwt/src/qwt_plot_spectrogram.h \

              ../qwt/src/qwt_plot_spectrocurve.h \

              ../qwt/src/qwt_plot_seriesitem.h \

              ../qwt/src/qwt_plot_scaleitem.h \

              ../qwt/src/qwt_plot_rescaler.h \

              ../qwt/src/qwt_plot_renderer.h \

              ../qwt/src/qwt_plot_rasteritem.h \

              ../qwt/src/qwt_plot_picker.h \

              ../qwt/src/qwt_plot_panner.h \

              ../qwt/src/qwt_plot_marker.h \

              ../qwt/src/qwt_plot_magnifier.h \

              ../qwt/src/qwt_plot_layout.h \

              ../qwt/src/qwt_plot_item.h \

              ../qwt/src/qwt_plot_intervalcurve.h \

              ../qwt/src/qwt_plot_histogram.h \

              ../qwt/src/qwt_plot_grid.h \

              ../qwt/src/qwt_plot_directpainter.h \

              ../qwt/src/qwt_plot_dict.h \

              ../qwt/src/qwt_plot_curve.h \

              ../qwt/src/qwt_plot_canvas.h \

              ../qwt/src/qwt_plot.h \

              ../qwt/src/qwt_picker_machine.h \

              ../qwt/src/qwt_picker.h \

              ../qwt/src/qwt_panner.h \

              ../qwt/src/qwt_painter.h \

              ../qwt/src/qwt_null_paintdevice.h \

              ../qwt/src/qwt_matrix_raster_data.h \

              ../qwt/src/qwt_math.h \

              ../qwt/src/qwt_magnifier.h \

              ../qwt/src/qwt_legend_itemmanager.h \

              ../qwt/src/qwt_legend_item.h \

              ../qwt/src/qwt_legend.h \

              ../qwt/src/qwt_knob.h \

              ../qwt/src/qwt_interval_symbol.h \

              ../qwt/src/qwt_interval.h \

              ../qwt/src/qwt_global.h \

              ../qwt/src/qwt_event_pattern.h \

              ../qwt/src/qwt_dyngrid_layout.h \

              ../qwt/src/qwt_double_range.h \

              ../qwt/src/qwt_dial_needle.h \

              ../qwt/src/qwt_dial.h \

              ../qwt/src/qwt_curve_fitter.h \

              ../qwt/src/qwt_counter.h \

              ../qwt/src/qwt_compat.h \

              ../qwt/src/qwt_compass_rose.h \

              ../qwt/src/qwt_compass.h \

              ../qwt/src/qwt_column_symbol.h \

              ../qwt/src/qwt_color_map.h \

              ../qwt/src/qwt_clipper.h \

              ../qwt/src/qwt_arrow_button.h \

              ../qwt/src/qwt_analog_clock.h \

              ../qwt/src/qwt_abstract_slider.h \

              ../qwt/src/qwt_abstract_scale_draw.h \

              ../qwt/src/qwt_abstract_scale.h \

              ../qwt/src/qwt.h \

              LIBS += ../ysom/lib/libysom-win32.a \

              ../csv/lib/libcsv-win32.a \

              ../fft/lib/libfft-win32.a \

              ../qwt/lib/libqwt.a \

              ../qwt/lib/libqwtmathml.a

              INCLUDEPATH += ../qwt/src \

              #}
              #unix {
              TARGET = IbnZuhr-linux

              DEPENDPATH += /usr/lib
              
              INCLUDEPATH += /usr/include/qwt \
              
              LIBS += ../ysom/lib/libysom-linux.a \
                  ../csv/lib/libcsv-linux.a \
                  ../fft/lib/libfft-linux.a \
                  /usr/lib/libqwt.so
              

              #}
              @

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mbnoimi
                wrote on last edited by
                #7

                I noticed something strange too in IbnZuhr.pro which is qwt project appears in projects tree although I put it in win32 block!!!

                @win32 {
                SUBDIRS += qwt
                }@

                PS
                I'm using Linux Mint x64

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on last edited by
                  #8

                  maybe it is the trailing backslash on the last line (INCLUDEPATH) in the win32 section...

                  Try to remove all lines in the win32 section, re-add line for line/section and check if the fault reoccurs.

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mbnoimi
                    wrote on last edited by
                    #9

                    Voilà! I found the issue it's in this part of core.pro

                    @LIBS += ../ysom/lib/libysom-win32.a
                    ../csv/lib/libcsv-win32.a
                    ../fft/lib/libfft-win32.a
                    ../qwt/lib/libqwt.a
                    ../qwt/lib/libqwtmathml.a @

                    Now the problem solved partially, I still see qwt project appears in projects tree although I'm working under linux and qwt should appears under windows only.

                    What's wrong in IbnZuhr.pro file?

                    @TEMPLATE = subdirs
                    CONFIG += ordered

                    unix {
                    SUBDIRS +=
                    csv
                    fft
                    ysom
                    core
                    }

                    win32 {
                    SUBDIRS +=
                    csv
                    fft
                    ysom
                    qwt
                    core
                    }@

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      goetz
                      wrote on last edited by
                      #10

                      Seems to be a bug, at least in 2.4.1. I can reproduce the faulty behavior on my installation. I suggest opening an issue at the "public bugtracker":https://bugreports.qt-project.org

                      http://www.catb.org/~esr/faqs/smart-questions.html

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        mbnoimi
                        wrote on last edited by
                        #11

                        [quote author="Volker" date="1335173131"]Seems to be a bug, at least in 2.4.1. I can reproduce the faulty behavior on my installation. I suggest opening an issue at the "public bugtracker":https://bugreports.qt-project.org[/quote]

                        Could you please file this bug report instead of me because "stupid bugtracker not working":https://qt-project.org/forums/viewthread/15297/ !

                        1 Reply Last reply
                        0
                        • G Offline
                          G Offline
                          goetz
                          wrote on last edited by
                          #12

                          Done. Issue ID is QTCREATORBUG-7339.

                          http://www.catb.org/~esr/faqs/smart-questions.html

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            goetz
                            wrote on last edited by
                            #13

                            Response from the Creator developers:

                            bq. That's on purpose

                            The ticket has been closed as "invalid".

                            http://www.catb.org/~esr/faqs/smart-questions.html

                            1 Reply Last reply
                            0
                            • T Offline
                              T Offline
                              tobias.hunger
                              wrote on last edited by
                              #14

                              I think the idea for not honoring scopes in Qt Creator is that you still should be able to see and edit files, even though they are not built on a platform...

                              1 Reply Last reply
                              0
                              • G Offline
                                G Offline
                                goetz
                                wrote on last edited by
                                #15

                                That makes sense.

                                As Creator does not build the stuff, but just calls qmake/make on the command line, the correct set of files is used for the build step.

                                http://www.catb.org/~esr/faqs/smart-questions.html

                                1 Reply Last reply
                                0

                                • Login

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