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. I Cannot Get My .pro File To Work On Mac
Forum Updated to NodeBB v4.3 + New Features

I Cannot Get My .pro File To Work On Mac

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 243 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.
  • T Offline
    T Offline
    TheCRV
    wrote on last edited by TheCRV
    #1

    Hello and Happy New Year,

    I have recently purchased a 2023 MacBook Pro, and I am trying to port my project over to MacOS. Here is the contents of my .pro file:

    QT       += core gui
    QT       += concurrent
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    CONFIG += c++17
    
    
    
    # You can make your code fail to compile if it uses deprecated APIs.
    # In order to do so, uncomment the following line.
    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
    
    INCLUDEPATH +=
    
    SOURCES += \
        /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/checkableproxymodel.cpp \
        /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/delayedexecutiontimer.cpp \
        /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/main.cpp \
        /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/mainwindow.cpp \
        /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/opensslchecksum.cpp \
        /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/settingsmain.cpp
    
    HEADERS += \
        /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/checkableproxymodel.h \
        /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/delayedexecutiontimer.h \
        /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/mainwindow.h \
        /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/opensslchecksum.h \
        /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/settingsmain.h
    
    FORMS += \
        /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/mainwindow.ui \
        /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/settingsmain.ui
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    

    I have tried adding $$PWD to the include line and the relative paths, but I still can't see any of my .cpp, .h, or .ui files. The errors that Qt gives me are:

    -1: error: Project ERROR: failed to parse default search paths from compiler output
    -1: error: Error while parsing file /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/Checksum1.pro. Giving up.

    Any help would be much appreciated. I am running the latest version of Qt Creator and am using Qt 5.15.2 Clang 64-bit.

    Christian EhrlicherC 1 Reply Last reply
    0
    • T TheCRV

      Hello and Happy New Year,

      I have recently purchased a 2023 MacBook Pro, and I am trying to port my project over to MacOS. Here is the contents of my .pro file:

      QT       += core gui
      QT       += concurrent
      
      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      
      CONFIG += c++17
      
      
      
      # You can make your code fail to compile if it uses deprecated APIs.
      # In order to do so, uncomment the following line.
      #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
      
      INCLUDEPATH +=
      
      SOURCES += \
          /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/checkableproxymodel.cpp \
          /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/delayedexecutiontimer.cpp \
          /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/main.cpp \
          /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/mainwindow.cpp \
          /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/opensslchecksum.cpp \
          /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/settingsmain.cpp
      
      HEADERS += \
          /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/checkableproxymodel.h \
          /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/delayedexecutiontimer.h \
          /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/mainwindow.h \
          /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/opensslchecksum.h \
          /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/settingsmain.h
      
      FORMS += \
          /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/mainwindow.ui \
          /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/settingsmain.ui
      
      # Default rules for deployment.
      qnx: target.path = /tmp/$${TARGET}/bin
      else: unix:!android: target.path = /opt/$${TARGET}/bin
      !isEmpty(target.path): INSTALLS += target
      

      I have tried adding $$PWD to the include line and the relative paths, but I still can't see any of my .cpp, .h, or .ui files. The errors that Qt gives me are:

      -1: error: Project ERROR: failed to parse default search paths from compiler output
      -1: error: Error while parsing file /Users/crv/Documents/Programming/C++/Qt/Checksum1/Checksum1-V1.0-master/Checksum1.pro. Giving up.

      Any help would be much appreciated. I am running the latest version of Qt Creator and am using Qt 5.15.2 Clang 64-bit.

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

      Why are there absolute paths in the pro file? Remove them.

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

      T 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        Why are there absolute paths in the pro file? Remove them.

        T Offline
        T Offline
        TheCRV
        wrote on last edited by
        #3

        @Christian-Ehrlicher Thanks for your reply. I have tried removing them, and it still didn't work. However, I have solved the problem: I have to use Qt 6.5.3, and now I can see everything.

        1 Reply Last reply
        0
        • T TheCRV 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