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. Problem compiling/deploying with Qt Creator 2.6.2, possible bug?
Forum Updated to NodeBB v4.3 + New Features

Problem compiling/deploying with Qt Creator 2.6.2, possible bug?

Scheduled Pinned Locked Moved General and Desktop
16 Posts 5 Posters 4.5k 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.
  • C Offline
    C Offline
    Code_ReaQtor
    wrote on last edited by
    #1

    Hi!

    I am using Qt 4.8.4 (msvc2008, static) to code one of my projects and to distribute the executable to my "schoolmates" (end user). I can compile my program using Qt Creator 2.6.2 and it run properly in my PC but when it is distributed to my end-user, they get an error:

    bq. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.

    However when I compile my program using an OLDER Qt Creator 2.6.0, the distributed executable works on all of my end-user machines, "plus my executable is reduced by 0.5Mb in size".

    Is this a possible bug in Qt Creator 2.6.2? How can I solve this?
    Thanks in advance

    Please visit my open-source projects at https://github.com/Code-ReaQtor.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      Qt Creator plays no part in the binary code generation or linking, it is just a shell around your compiler of choice. You "solve this" by determining what is different about the compiler and libraries that are being used and why it should result in linking against a different Microsoft VC++ runtime... or you could just deploy the required MSVC runtime.

      The Dependency Walker may help identify what libraries are required.

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        It could be, however, that build environment is set a bit differently in 2.6.2. Check if there are changes there, too.

        (Z(:^

        1 Reply Last reply
        0
        • U Offline
          U Offline
          utcenter
          wrote on last edited by
          #4

          I don't think the static build includes every external dependency, perhaps lacking MSVC runtimes on the end user machines? Might be wrong though...

          1 Reply Last reply
          0
          • C Offline
            C Offline
            Code_ReaQtor
            wrote on last edited by
            #5

            [quote author="sierdzio" date="1360571398"]It could be, however, that build environment is set a bit differently in 2.6.2. Check if there are changes there, too.[/quote]

            I am thinking the same way. But how can I find that? It is possible that 2.6.2 and 2.6.0 have different sets arguments passed to the compiler. I have not much knowledge of Qt Creator's internal. Qt Creator 2.6.2 is AFAIK is better (and faster, I think) but for my current project, I will be using Qt Creator 2.6.0 temporarily until the problem is solved.

            [quote author="ChrisW67" date="1360571058"]or you could just deploy the required MSVC runtime.[/quote]

            That is also possible but another extra MB into my package is NOT a practical way in deploying it. If I go that way, how can I install it using "Inno Setup"? Since I am using it in creating the installer.

            Please visit my open-source projects at https://github.com/Code-ReaQtor.

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              You can check build steps, build environment and run environment for every project from "Projects" pane on the laft-hand side of Qt Creator.

              (Z(:^

              1 Reply Last reply
              0
              • C Offline
                C Offline
                Code_ReaQtor
                wrote on last edited by
                #7

                [quote author="sierdzio" date="1360586173"]You can check build steps, build environment and run environment for every project from "Projects" pane on the laft-hand side of Qt Creator.[/quote]

                Found out the 2 versions of Qt Creator uses the SAME arguments passed to qmake. Found no differences.

                Please visit my open-source projects at https://github.com/Code-ReaQtor.

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  ChrisW67
                  wrote on last edited by
                  #8

                  It is not the arguments to qmake, rather which qmake and the arguments to your C++ compiler/linker generated by qmake that are of importance.

                  Are the two Qt Creator versions running the same qmake from the same instance of Qt?
                  Is the resulting Makefile invoking the same C++ compiler with the same arguments?
                  ... including the same library search paths in the same order?
                  ... including the same external libraries in the same order?

                  Something is different or you would not be getting a different result.

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

                    Basically Creator does not build anything, it just runs commands you would normally run on the command line. Which commands those are is shown in the Projects mode: It runs qmake with some arguments (check the qmake step) and then make/jom/nmake. Check the make step for which arguments are used there.

                    What might have changed in subtle ways is the environment used to run the commands in. Check the Environment settings.

                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      Code_ReaQtor
                      wrote on last edited by
                      #10

                      [quote author="ChrisW67" date="1360641594"]Are the two Qt Creator versions running the same qmake from the same instance of Qt? [/quote]

                      Yes. They are using the same qmake.

                      [quote author="ChrisW67" date="1360641594"]
                      Is the resulting Makefile invoking the same C++ compiler with the same arguments?
                      ... including the same library search paths in the same order?
                      ... including the same external libraries in the same order?[/quote]

                      I will check on it. Thanks! But I think they will be of same result since they are using the same qmake.

                      [quote author="Tobias Hunger" date="1360654959"]Basically Creator does not build anything, it just runs commands you would normally run on the command line. Which commands those are is shown in the Projects mode: It runs qmake with some arguments (check the qmake step) and then make/jom/nmake. Check the make step for which arguments are used there.

                      What might have changed in subtle ways is the environment used to run the commands in. Check the Environment settings.[/quote]

                      Are there any "internal" arguments coming from Qt Creator NOT revealed to the user?

                      Please visit my open-source projects at https://github.com/Code-ReaQtor.

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

                        Code_ReaQtor: Nope. Everything creator uses is displayed in Projects mode. Creator is supposed to play nice with the command line, so using secret arguments would be stupid.

                        1 Reply Last reply
                        0
                        • C Offline
                          C Offline
                          Code_ReaQtor
                          wrote on last edited by
                          #12

                          [quote author="Tobias Hunger" date="1360672603"]Code_ReaQtor: Nope. Everything creator uses is displayed in Projects mode. Creator is supposed to play nice with the command line, so using secret arguments would be stupid.[/quote]

                          Thanks! I can't still find any answer as to why my deployed application have such an error. All I just did was to shift from 2.6.0 to 2.6.2 and everything are similar, like both version points to the same qmake. Found some solutions from MSDN about updating the VC++ Runtime. I can't do that though since I don't control the end-user's computer.

                          Please visit my open-source projects at https://github.com/Code-ReaQtor.

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

                            Sorry, I am no windows expert...

                            Are you really using the same compiler? There were some fixes to MSVC support (even though that was in master/2.7 IIRC), maybe that resulted in you switching compilers without noticing.

                            Are you really using the same Qt version? Easier to pin down:-)

                            Are you really using the same environment in both versions of creator? This is the most likely candidate for your trouble.

                            1 Reply Last reply
                            0
                            • C Offline
                              C Offline
                              Code_ReaQtor
                              wrote on last edited by
                              #14

                              [quote author="Tobias Hunger" date="1360687470"]
                              Are you really using the same compiler?
                              Are you really using the same Qt version?
                              Are you really using the same environment in both versions of creator? This is the most likely candidate for your trouble.[/quote]

                              Yes, yes, and yes... :)

                              I am only using a specific compiler. VS2008
                              I only have a single Qt version built in static mode in my machine. Qt 4.8.4 msvc2008 - static
                              My 2.6.0 and 2.6.2 version have the same environment.

                              Please visit my open-source projects at https://github.com/Code-ReaQtor.

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

                                What kind of output do you get when running qmake/make on the command line?

                                1 Reply Last reply
                                0
                                • C Offline
                                  C Offline
                                  Code_ReaQtor
                                  wrote on last edited by
                                  #16

                                  [quote author="Tobias Hunger" date="1360741849"]What kind of output do you get when running qmake/make on the command line?[/quote]

                                  actually, nothing different from other "qmake" (other Qt Version) I have

                                  @C:\QtSDK\Desktop\Qt\4.8.4\msvc2008-static\bin>qmake
                                  Usage: qmake [mode] [options] [files]

                                  QMake has two modes, one mode for generating project files based on
                                  some heuristics, and the other for generating makefiles. Normally you
                                  shouldn't need to specify a mode, as makefile generation is the default
                                  mode for qmake, but you may use this to test qmake on an existing project

                                  Mode:
                                  -project Put qmake into project file generation mode
                                  In this mode qmake interprets files as files to
                                  be built,
                                  defaults to *.c; *.ui; *.y; *.l; *.ts; *.xlf; *.qrc; *.h; *.hpp
                                  ; *.hh; *.hxx; *.cpp; *.cc; *.cxx
                                  Note: The created .pro file probably will
                                  need to be edited. For example add the QT variable to
                                  specify what modules are required.
                                  -makefile Put qmake into makefile generation mode (default)
                                  In this mode qmake interprets files as project files to
                                  be processed, if skipped qmake will try to find a project
                                  file in your current working directory

                                  Warnings Options:
                                  -Wnone Turn off all warnings; specific ones may be re-enabled by
                                  later -W options
                                  -Wall Turn on all warnings
                                  -Wparser Turn on parser warnings
                                  -Wlogic Turn on logic warnings (on by default)
                                  -Wdeprecated Turn on deprecation warnings (on by default)

                                  Options:

                                  • You can place any variable assignment in options and it will be *
                                  • processed as if it was in [files]. These assignments will be parsed *
                                  • before [files]. *
                                    -o file Write output to file
                                    -d Increase debug level
                                    -t templ Overrides TEMPLATE as templ
                                    -tp prefix Overrides TEMPLATE so that prefix is prefixed into the value
                                    -help This help
                                    -v Version information
                                    -after All variable assignments after this will be
                                    parsed after [files]
                                    -norecursive Don't do a recursive search
                                    -recursive Do a recursive search
                                    -set <prop> <value> Set persistent property
                                    -unset <prop> Unset persistent property
                                    -query <prop> Query persistent property. Show all if <prop> is empty.
                                    -cache file Use file as cache [makefile mode only]
                                    -spec spec Use spec as QMAKESPEC [makefile mode only]
                                    -nocache Don't use a cache file [makefile mode only]
                                    -nodepend Don't generate dependencies [makefile mode only]
                                    -nomoc Don't generate moc targets [makefile mode only]
                                    -nopwd Don't look for files in pwd [project mode only]@

                                  Please visit my open-source projects at https://github.com/Code-ReaQtor.

                                  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