Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [howto] distinguish between console- and windows-application?
Forum Updated to NodeBB v4.3 + New Features

[howto] distinguish between console- and windows-application?

Scheduled Pinned Locked Moved Installation and Deployment
10 Posts 5 Posters 5.2k 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.
  • J Offline
    J Offline
    joergs1968
    wrote on last edited by
    #1

    the Qt suite fails to build inside the qml-viewer, ''it'' thinks that the qmlviewer.exe is a windows-application and thus the linker fails finding "wmain()" - it should have looked for "main()" instead...

    how is this handled?

    • the qml.pro TEMPLATE is set to "app" <-- is this a console application or a windows application?

    in my qmake.conf I have seperate entries for each:

    QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB /ENTRY:mainACRTStartup
    QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB /ENTRY:mainWCRTStartup

    so, for console applications "mainACRTStartup" is called which in turn calls "main()"; for windows applications "mainWCRTStartup" is called which in turn calls "wmain()"...

    what must be changed to use "QMAKE_LFLAGS_CONSOLE" i.s.o. "QMAKE_LFLAGS_WINDOWS" when building qml ??

    1 Reply Last reply
    0
    • J Offline
      J Offline
      joergs1968
      wrote on last edited by
      #2

      I found that out by myself - no help from here :-(

      actually a "CONFIG += console" was missing for a lot of "TEMPLATE = app" project files, don't know why but that was what was missing...

      problem only existed for my WinEA7 cross-compilation installment, my native Windows installment went thru without complaining...

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

        [quote author="joergs1968" date="1305571951"]I found that out by myself - no help from here :-([/quote]

        Crying will most probably not change this....

        http://www.catb.org/~esr/faqs/smart-questions.html

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

          [quote author="Volker" date="1305580370"]
          [quote author="joergs1968" date="1305571951"]I found that out by myself - no help from here :-([/quote]

          Crying will most probably not change this....[/quote]
          lol

          Write “Qt”, not “QT” (QuickTime).

          1 Reply Last reply
          0
          • J Offline
            J Offline
            joergs1968
            wrote on last edited by
            #5

            very funny...

            what should have I done to get some help?

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on last edited by
              #6

              Sometimes no one has an answer to one's problems. This is live - you will not change it. But yelling at people that they were not of help will most probably make them ignore your posts in the future completely, even if one would have an answer.

              Always remember:
              This forum, and the entire DevNet lives from volunteeers, doing the support in their spare time for nothing than fun and a little badge here and then.

              Oh, and I personally, would be proud to have found the solution myself, instead of blaming others not having helped.

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andre
                wrote on last edited by
                #7

                First of all: thank you for reporting back with your solution at all. That is useful for future reference.

                Then, note the page in Volkers signature. That webpage, although geared towards mailing lists or usenet forums, gives you a lot of information on how to formulate questions in such a way as to invoke the interest of (skilled) readers. Perhaps a better start post or a clearer topic item might have invoked more reactions, though to be honest, it is not the worst one I have seen around here.

                Read that page. If nothing else, I found it a fun read.

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  joergs1968
                  wrote on last edited by
                  #8

                  my bad, sorry

                  actually it was my fault from the beginning, as I thought in windows terms:

                  console application: main() gets called...
                  windows application: WinMain() gets called...

                  apparently this is not the case for Qt as it's main purpose is to be portable, meaning: main() gets called everywhere

                  for the ":-(" I'd like to appologize, I simply over-reacted...

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    koahnig
                    wrote on last edited by
                    #9

                    I think your frustration culminated just in this thread of yours. I have been wondering after your first reply why it hasn't triggered any feedback in the first place.

                    Andre is completely right there are other threads being worde, but they trigger responses.

                    However, to give this a different focus.
                    Is there a way to trigger responses from Qt's experts?
                    I left out the adjective "professional" in order to avoid aversions by others. Because the responses are from professionals volunteering to do so in the forum. And certainly I do not intend to steer up things.

                    The other thread of joergs1968 seem to be more the reason of his frustration. And response from someone with deep insight to the compilation guts of Qt would have been probably helpful.

                    Vote the answer(s) that helped you to solve your issue(s)

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      koahnig
                      wrote on last edited by
                      #10

                      Ups, here is the "link":http://developer.qt.nokia.com/forums/viewthread/5774/

                      Vote the answer(s) that helped you to solve your issue(s)

                      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