[solved] Application did not run on different Windows Versions (MSVC2008 + QT4.7.1)



  • Hello,

    I have a big Problemw with my application. I develop with Win7 and Visual Studio 2008. After compileing the "release" version and making a installer with NSIS(which included all the Qt and Microsoft Redistributable files) i started it. On the development machine it is working without any probs. On another machine which has also Visual Studio installed but WinXP64 it works also.
    The probs are on the machines where the program is written for(the application is written for a CAVE environment to display 3D images). The machines have WinXP64 installed but no version of Visual Studio. Further no other software is installed. When I start the program, no error occurs. Only the image for the start screen and the icons for the menus are not "included" (same version like i used on the other machines). After I tested the main program it crashes on different actions. I tried to figure out which DLL's the application needs and there is no missing (Dependency Walker).

    Now I really need help! Maybe there is some other package I need to run QT applications on a different Windows machine??

    I appreciate every solution, it took me already one day!

    greetz
    steph0815



  • Was the proper visual studio redistributable package installed on those PCs? The images issue is curious (there's another thread about it in the deployment forum, which is probably where this one belongs as well). Did you include all necessary plug-ins in your distribution?



  • I tried with redistributable package and now my last solution is to deinstall them



  • Are you sure, that all Dlls, that are found by dependency walker, are in the correct version? Build with the same MSVS version (SP etc.)?



  • Hello man
    I do not understand what the problem
    You are telling us that you have launched the application on another machines

    The probs are on the machines where the program is written for(the application is written for a CAVE environment to display 3D images)

    So You can't launch on that machines?

    Is the problem you the icons of your applications are not visible?

    Trying to help us all..
    Pavel



  • You have very interesting project
    Perhaps I can help you with the work
    I develop using Qt SDK only
    Qt Creator deals with C++ ok
    please write me at
    pmazniker@gmail.com if you have any task to deliver me I will make you for the money
    Whether you can pay for problems solving, for software development?
    Pavel



  • I have tried also to deploy with dlls from plugins/codecs , plugins/imageformats, plugins/iconengines but still I can’t see icons
    I can see only when I install full Qt SDK and I deploy to qt/bin directory
    But we understand the end user should not install full Qt SDK so as to use application
    why such a problem?>


  • Moderators

    You can use some process monitor to check which files your application is trying (and failing) to open. That should give you a better understanding of which files you actually need to distribute.



  • Sorry it was lunch time :)

    -Gerolf
    Yes i use the DLL which come from the development machine. When I analyze the application with Dependency Walker it gives me the same output.

    -Pavel Mazniker
    Yes the problems are on machines which are not used for development and where no third-party software is installed. The first prob I see is the missing image and the missing icons. The task behind the menu is working. Only when I open images the program crash's. On one machine the program wont start at all and gives me only the output that i should reinstall the software.

    -Tobias Hunger
    Will try that, totally forgot about a process monitor!

    -all
    still there is the question why is it not working with the icons but the program is starting?! Did I miss something?

    THX so far!!



  • [quote author="steph0815" date="1298034219"]-all
    still there is the question why is it not working with the icons but the program is starting?! Did I miss something?[/quote]
    This is normal behavior, the OS doesn't load all the dll's when your application starts, this is an optimization to start applications faster.

    As for the crash make sure that you deploy the correct dll's, and imageformats folder should be directly in the same folder as application, not in the plugins folder.



  • See "this thread":http://developer.qt.nokia.com/forums/viewthread/3641/, it has similar problems regarding icons. It is crucial to setup the plugins folder correctly (and maybe add it to the library path, see the thread for a snippet).

    Also, have a look at "Dependencies in Qt":http://developer.qt.nokia.com/wiki/Qt_Library_Cross_Dependencies to check if you deliver all relevant libs and plugins.

    For visual studio it is very likely that you will have to install the runtime redistributalbe (ie. run vcredist_xxx.exe on the target machine or include the libs into an MSI installer). If that is missing, the system moans about a bad application configuration and recommends to "reinstall" it (which does not work if you do not at the redist package).

    If a plugin is missing (imageformat, iconengine), the program starts but does not handle the data - resulting in missing icons.



  • Hey,

    THX Holger u saved my life again. I used the library path import u wrote on the other article and now it is working fine. I figured it out that this is the problem when i used the QT directory structure for the plugins. After I created the /QT/4.7.1/plugins/.... folder it worked. Then I added your path import and now it works perfect!!

    I only copy the c++ redistributables direct in my working directory. Is that a problem or can I stay with that?

    THX
    steph0815



  • The path to the plugins directory can be any, just put it where you want (e.g. as a subdirectory in the directory where your .exe lives) as long as that subdir contains further subdirs with imageformats, iconengines, sqldrivers and so on.

    Regarding the redistributables: That could work too, I'm not really sure. Microsoft wanted to abandon the DLL hell and created the manifest fiasco that makes things even more complicated :-/ I usually just run vcredist_xxxx.exe in my installers, regardless if it is already present or not. If you use Windows Installer MSI (WiX or the like) you can use the Microsoft provided merge modules to include the redistributables.



  • I just figured out that it is not working with the redistributibles in the directory. It still needs a installed version of it. So I include it in my Installer (NSIS).

    THX



  • Yea, the redistributables for windows (msvcrt*.dll) are loaded via manifest files from the side by side installation (<windowshome>\winSxs...). On that way, you can have more than one version on that windows and it is needed, as the different compiler versions (also via SPs) have different C-runtimes.



  • Hi people
    It is such a joy to see a lot of developers, engineers in one place…
    So are you sure the problem with icons are not visible solved by deploing also plugin directory with its subdirectories together with dlls and .exe on Windows?



  • Pavel, if you have a problem, please open your own thread or stick to that one that deals with it (I suppose you mean "this one":http://developer.qt.nokia.com/forums/viewthread/3908/). It is regarded bad behavior to hijack other threads and it clutters the flow of logic and answers.

    Secondly, I want to point you to the edit link on the right side of your comments. Please use it if you have to correct your posts (and leave a note there). It's not very nice to have tons of double posts that differ only in a few words. I have deleted one of the double posts.

    Third, please do not answer to this comment here. If you have questions on netiquette etc, pleas read the forum help, the wiki, use google and ask in the Lounge.

    Thanks for listening.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.