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. Warning: non-portable path to file. Why and how to fix it?
Forum Updated to NodeBB v4.3 + New Features

Warning: non-portable path to file. Why and how to fix it?

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 12.6k 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.
  • B Offline
    B Offline
    bogong
    wrote on last edited by
    #1
    Prototype/main.cpp:19: warning: non-portable path to file '"../Universal/cpp/Global/aglobal.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
    #include "../Universal/cpp/Global/aGlobal.h"
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             "../Universal/cpp/Global/aglobal.h"
    
    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Fix the upper/lower case of your include statement

      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
      1
      • Christian EhrlicherC Christian Ehrlicher

        Fix the upper/lower case of your include statement

        B Offline
        B Offline
        bogong
        wrote on last edited by
        #3

        @Christian-Ehrlicher I haven't been changing anything old project just started to show this message. How to fix it?

        JonBJ 1 Reply Last reply
        0
        • B bogong

          @Christian-Ehrlicher I haven't been changing anything old project just started to show this message. How to fix it?

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by JonB
          #4

          @bogong

          1. Look at precisely how the path case is when it's on whatever your disk is (also seemingly shown in error message).
          2. Change the #include statement to match that precisely (looks like it should be aglobal.h for the filename).
          1 Reply Last reply
          0
          • B Offline
            B Offline
            bogong
            wrote on last edited by
            #5

            Solution found ...
            I've been experimenting with CamelCase naming. And after it switched on again "lower case property" in settings. But in moc-files and QT Creator cache - was still CamelCase notated files. Restarting Qt Creator and reload project solve the issue.

            JonBJ 1 Reply Last reply
            0
            • B bogong

              Solution found ...
              I've been experimenting with CamelCase naming. And after it switched on again "lower case property" in settings. But in moc-files and QT Creator cache - was still CamelCase notated files. Restarting Qt Creator and reload project solve the issue.

              JonBJ Online
              JonBJ Online
              JonB
              wrote on last edited by JonB
              #6

              @bogong

              @Christian-Ehrlicher I haven't been changing anything old project just started to show this message.

              I've been experimenting with CamelCase naming. And after it switched on again "lower case property" in settings

              ! :)

              Anyway glad you're solved.

              B 1 Reply Last reply
              0
              • JonBJ JonB

                @bogong

                @Christian-Ehrlicher I haven't been changing anything old project just started to show this message.

                I've been experimenting with CamelCase naming. And after it switched on again "lower case property" in settings

                ! :)

                Anyway glad you're solved.

                B Offline
                B Offline
                bogong
                wrote on last edited by bogong
                #7

                @JonB Physically I've been returning to the state of last commit. And yes - it wasn't changed. But Qt creator when asked to reload all files didn't reload cache and didn't rebuild moc ... And if you will look carefully there are in log strange thing:

                #include "../Universal/cpp/Global/aGlobal.h"
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                         "../Universal/cpp/Global/aglobal.h"
                

                In a first line aGlobal.h and in second aglobal.h and physically file named aglobal.h

                All of it written totally correct ... If it's smiling you - I am OK with that ...
                Issue closed.

                1 Reply Last reply
                1

                • Login

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