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. visual studio to qt

visual studio to qt

Scheduled Pinned Locked Moved General and Desktop
8 Posts 2 Posters 1.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.
  • sajis997S Offline
    sajis997S Offline
    sajis997
    wrote on last edited by
    #1

    Hello forum,

    I am a simple console application running in C++ that runs fine over visual studio. Now I am trying to port the application to Qt using Qt creator. While doing it, I am encountering the following issues :

    1. The argc arguement showing different values in Qt. I am getting 1 in visual studio debugger , but getting 2 while running the debugger with Qt creator and this value is changing the logic of the application - ending up with some exception generated by the application. Any hint to get around this issue ?

    Thanks

    1 Reply Last reply
    0
    • sajis997S Offline
      sajis997S Offline
      sajis997
      wrote on last edited by
      #2

      One more interesting thing to point out. I checked the argv[] array . The contents are same both with visual studio debugger and qt creator one. I believe Qt creator is also using the visual studio debugger at the back-end. But the value of argc is 1 when debugging with visual studio and 2 when debugging with qt creator.

      I believe that this tiny detail will help you to come up with some tips to address this issue.

      Thanks

      K 1 Reply Last reply
      0
      • sajis997S sajis997

        One more interesting thing to point out. I checked the argv[] array . The contents are same both with visual studio debugger and qt creator one. I believe Qt creator is also using the visual studio debugger at the back-end. But the value of argc is 1 when debugging with visual studio and 2 when debugging with qt creator.

        I believe that this tiny detail will help you to come up with some tips to address this issue.

        Thanks

        K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        @sajis997
        Qt creator is an IDE and it uses external debuggers for debugging. There is no reason to have different results when started under VS or Qt creator.

        Check out in Qt creator on the left side under "Projects" you see the proejct setup. Change to "Run settings" for the kit you are using.
        Porbably there is something set in the Arguments line. This will be passed as argument to your application.

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

        1 Reply Last reply
        1
        • sajis997S Offline
          sajis997S Offline
          sajis997
          wrote on last edited by
          #4

          Hi

          The "Arguments" textfield is empty. Any where else to look into ?

          Thanks

          K 1 Reply Last reply
          0
          • sajis997S sajis997

            Hi

            The "Arguments" textfield is empty. Any where else to look into ?

            Thanks

            K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            @sajis997
            Can you see in the debugger what is passed as argument?
            You should be able to this. The first argument is the exe including path and what is next element?
            Is the first element correct?

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

            sajis997S 1 Reply Last reply
            0
            • K koahnig

              @sajis997
              Can you see in the debugger what is passed as argument?
              You should be able to this. The first argument is the exe including path and what is next element?
              Is the first element correct?

              sajis997S Offline
              sajis997S Offline
              sajis997
              wrote on last edited by
              #6

              @koahnig

              The first argument is as you mentioned - the .exe file. The second argument is -
              67 'C'. I accessed the value from the argv value , I hope this is what you meant.

              K 1 Reply Last reply
              0
              • sajis997S sajis997

                @koahnig

                The first argument is as you mentioned - the .exe file. The second argument is -
                67 'C'. I accessed the value from the argv value , I hope this is what you meant.

                K Offline
                K Offline
                koahnig
                wrote on last edited by
                #7

                @sajis997
                Yes, that is what I meant.
                Somewhere the extra 'C' must come from. You indicated that the Argumments under "Projects" is empty. Is the line above "Executable" holding only a valid executable name including the path?
                Are there blanks in that path?

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

                1 Reply Last reply
                0
                • sajis997S Offline
                  sajis997S Offline
                  sajis997
                  wrote on last edited by
                  #8

                  Let me clear it again. The "Arguments" field is under the "Run" and "Run" is under "Projects".

                  And , yes, the "Executable" is holding only a valid executable name including the path.

                  Do you not see both 67 and 'C' as extras ? You mentioned only 'C' as the extra argument in your last post. Any explanation ?

                  Any where else to look into to get around this issue ?

                  Thanks

                  Thanks

                  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