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. Backslash forward slash, cross platform problem?
Forum Updated to NodeBB v4.3 + New Features

Backslash forward slash, cross platform problem?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 10.3k 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.
  • P Offline
    P Offline
    plakkies
    wrote on last edited by
    #1

    Im very new to this, and im hoping somone here can point me in the right direction.

    I have inherited a project from the guy I took this job over from and have never used qt before. Ive been going through tutorials and its really growing on me. I figured it was about time i tried to tweek this old project a bit but I cant seem to compile it. Im lead to believe it did compile fine on the old guys mac, and I think this is where the problem lies, He developed on a mac and im developing on a pc. The problems Im getting involes the compiler not finding files and when I look deeper I see mixed up back slashes and forward slashes in file names. I cannot find these file names in the source anywhere. there are several which have the same name as a .cpp file but with an .o extention the compiler cant find this and shows the unknown file as /release\file.o

    Any help would be greatly appreciated, It would be great for this app to work on all platforms and hopefully as I get to know more I can get it there.

    Can someone please point me in the right direction.

    Thanks

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DenisKormalev
      wrote on last edited by
      #2

      .o files are object-files from gcc compiler. So you will not found them in sources.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Smar
        wrote on last edited by
        #3

        I suppose you develop on Windows and are using MSYS (or even MinGW, I don't know how it handles paths), so paths in generated files are quite inconsistent most of time. They will work with no problems though. Windows mostly supports / even in its own shell, it was quite a surprise to me.

        1 Reply Last reply
        0
        • F Offline
          F Offline
          Franzk
          wrote on last edited by
          #4

          Mixed backward/forward slashes is usually not a problem. Windows handles them pretty OK as it understands urls for local files as well. Also, while the paths are displayed with forward slashes in them, they are converted to backward slashes where necessary.

          If you run into this in your code and you are not sure a library can properly work with the forward slashes, use QDir::toNativeSeparators(). It'll sort it all out for you.

          "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

          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