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. Linux application not working on Windows
QtWS25 Last Chance

Linux application not working on Windows

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

    I created an application on Ubuntu 10.04, and it works fine on Ubuntu and other Linux distros, but when I move the source code to a computer with Windows Vista, the code compiles, but it doesn't run normally. When I run it from within the Qt Creator, it starts, but when I open it by double-clicking the exe file, I get an error message about a missing dll, and then the application crashes. Even when I run it from within Qt Creator, it claims that I don't have write permissions to my Desktop and Home folders.

    Any ideas will be greatly appreciated.

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

      About dlls. You should have proper paths in your environment variables to folders with qt dlls or you can simply copy them into folder with exe-file.

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

        You can find the missings dlls in C:\Qt\2010.04\qt\bin (if you have the 2010.04 version, the laste stable release), add this in your PATH enviroment variable or copy the dlls in the application folder, in this folder you can find, for example, QtCore4.dll and QtCored4.dll, the first is for application compiled in release mode and the second for debug mode

        (C:\Qt\2010.04\qt\bin is the default installation folder)

        1 Reply Last reply
        0
        • S Offline
          S Offline
          szh1
          wrote on last edited by
          #4

          I checked again, and the dll is called mingwm10.dll. Where is this library?

          My main concern is really that Qt thinks that I don't have write permissions to my home folder, while in linux it retrieves the permissions perfectly.

          Thanks

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

            All the dlls are in C:\Qt\2010.04\qt\bin\ and pay special attention in qt\ because you is easy to confuse with C:\Qt\2010.04\bin\

            about write permissions I see that problem when you try to compile your application whit the application running, may be some parts of your application are "running" try restarting, sometimes the solutions is change the compilation mode between debug and release try this to

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

              mingwm10.dll is library from mingw. You can find it in mingw distribution in Qt SDK. Don't remember the path, but it is there.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                szh1
                wrote on last edited by
                #7

                Thank you for the answers. I'm sorry I wasn't clear about the permissions. What I mean is that when my application calls "QFileInfo(fileName).isWritable" it returns false.

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

                  What is the filename? Which path are you trying to write into? IIRC windows by default uses the directory the application is installed into as working directory instead of the home directory.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    szh1
                    wrote on last edited by
                    #9

                    I am trying to retrieve the write permissions of "C:\Users\UserName", and isWritable returns false. Is this a bug in Qt? On Linux it works fine.

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

                      I am not sure, I currently do not have access to a windows box right now. It might actually be OK... Windows did get more secure since I last tried it:-)

                      What does your "My Documents" directory return for isWritable? Can you create files in C:\Users\UserName, preferably using the command line? The windows explorer has special logic to request extended permissions, so its results may not be relevant.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        szh1
                        wrote on last edited by
                        #11

                        Sorry it took me so long, but I finally have the results. I can write to my home folder using the command line.

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          szh1
                          wrote on last edited by
                          #12

                          When I call QFileInfo::isReadable about a file, it works fine. Maybe it is not valid for a directory?

                          If that is the case, is there another way to find out if a directory is writable? Why is there no QDir::isWritable function?

                          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