Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Adding gcc and gdb to Creator (Windows XP)
QtWS25 Last Chance

Adding gcc and gdb to Creator (Windows XP)

Scheduled Pinned Locked Moved Qt Creator and other tools
14 Posts 2 Posters 5.9k 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #1

    Hi -

    I have to begin developing on a XP platform. On the Mac, I was using gdb and gcc, and I'd like to use them on the XP box, too. I tried installing Cygwin, but...to be honest, I can't tell whether the installation was successful or not. It doesn't appear in my tool chain, so I assume I'm not done. So:

    1. Is Cygwin the best/only way to get gcc and gdb up on my XP?
    2. Does anyone have any experience running it? I've run the setup.exe, selected gcc4, but that's as far as I've gone.

    Thanks.

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

      I would advise against cygwin, better use a "MinGW":http://www.mingw.org/ environment. This is the platform supported by Qt too (the open source SDK can install a MinGW environment for you).

      If you install your own copy of MinGW, you'll have to build the Qt libs manually. That's quite easy, just like on the Mac. If you utilize the MinGW of the SDK you can use the prebuilt binaries of course.

      I happily switched our commercial project from Visual Studio to MinGW (self installed, not from the SDK) recently, it works like a charm.

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

      1 Reply Last reply
      0
      • mzimmersM Offline
        mzimmersM Offline
        mzimmers
        wrote on last edited by
        #3

        OK...I'll take your word for it (less work for me). MinGW it is. I'll be happy to use whatever debugger comes along with it.

        On the XP build, I'm getting a compile-time warning for this line of code:

        @const uint64_t BIT_56_63 = 0xff00000000000000;
        @

        The error is "integer constant too large for 'long' type"

        Am I running into a problem caused by the fact that my XP system is 32-bit, or is there something less insidious at play here? (I don't get this error on the Mac).

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

          Hm, I don't get an error or warning on my MinGW installation.

          Which MinGW do you use? The SDK bundled one or did you install it your self?
          What's your gcc version (call "gcc --version" on the MSYS command line)?
          Did you try to replace uint64_t with quint64?

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

          1 Reply Last reply
          0
          • mzimmersM Offline
            mzimmersM Offline
            mzimmers
            wrote on last edited by
            #5

            I'm using the bundled version that came in the download yesterday. According to the tool chain, it's in /QtSDK/mingw/bin/mingw32-g++.exe.

            I can't find the MSYS command line, so I can't tell you what version.

            And...I'm reluctant to use Qt data typing, because I don't yet know where all this program will be hosted, but I did test it, and got the same error.

            I was told that Boost might get me around this problem, but...how to install it isn't obvious (actually, not much of anything on Windows is obvious to me). I downloaded it and unzipped it, but haven't figured out how to complete the installation.

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

              Strange. Are you really sure you only do have a 64 bit constant?

              What is the output of

              @
              qDebug() << "sizeof(uint64_t)" << sizeof(uint64_t);
              qDebug() << "sizeof(quint64)" << sizeof(quint64);
              qDebug() << "sizeof(long long int)" << sizeof(long long int);
              qDebug() << "sizeof(long int)" << sizeof(long int);
              @

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

              1 Reply Last reply
              0
              • mzimmersM Offline
                mzimmersM Offline
                mzimmers
                wrote on last edited by
                #7

                [quote author="Volker" date="1322839386"]Strange. Are you really sure you only do have a 64 bit constant?[/quote]

                I'm not sure what you're asking...the hex value I'm supplying has 16 digits, which should correspond to 64 bits.

                [quote]What is the output of

                @
                qDebug() << "sizeof(uint64_t)" << sizeof(uint64_t);
                qDebug() << "sizeof(quint64)" << sizeof(quint64);
                qDebug() << "sizeof(long long int)" << sizeof(long long int);
                qDebug() << "sizeof(long int)" << sizeof(long int);
                @
                [/quote]

                sizeof (uint64_t) 8
                sizeof (quint64) 8
                sizeof (long long int) 8
                sizeof (long int) 4

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

                  Can you double-check that there is no typo and you do not have another digit sneaked in? The size of the types look ok.

                  What's the output of

                  @
                  qDebug() << GNUC << GNUC_MINOR << GNUC_PATCHLEVEL;
                  @

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

                  1 Reply Last reply
                  0
                  • mzimmersM Offline
                    mzimmersM Offline
                    mzimmers
                    wrote on last edited by
                    #9

                    Double- and triple-checked...the hex value is good (or at least, it's what I intend it to be. ff, followed by 14 0s.

                    I've also tried ff << 56 with similar results.

                    Is it possible that I'm omitting a needed header file? Which do you include in your example that worked?

                    Output of that line is:

                    4 4 0.

                    Thanks for helping.

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

                      That's the complete program:

                      @
                      #include <QtCore/QCoreApplication>
                      #include <QDebug>

                      int main(int argc, char *argv[])
                      {
                      QCoreApplication(argc, argv);
                      const quint64 ui64 = 0xf123456789abcdef;

                      qDebug() << "ui64" << ui64 << QString::number(ui64, 16);
                      qDebug() << "sizeof(quint64)" << sizeof(quint64);
                      qDebug() << "sizeof(uint64_t)" << sizeof(uint64_t);
                      qDebug() << "sizeof(long long int)" << sizeof(long long int);
                      qDebug() << "sizeof(long int)" << sizeof(long int);
                      
                      return 0;
                      

                      }
                      @

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

                      1 Reply Last reply
                      0
                      • mzimmersM Offline
                        mzimmersM Offline
                        mzimmers
                        wrote on last edited by
                        #11

                        Fascinating...I just copied your program, and I get the same warning I've been getting all along (line 7 this time).

                        Is your system 32-bit?

                        EDIT: I have a number of other compilers in my tool chain; would it be worth trying a different one? How does one go about shuffling the order of the auto-detected tools?

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

                          Hm. It's a 64bit Vista system. But MinGW and Qt both are 32bit versions, so theoretically that shouldn't be a problem.

                          I need to install the SDK on a 32 bit XP box next week to check.

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

                          1 Reply Last reply
                          0
                          • mzimmersM Offline
                            mzimmersM Offline
                            mzimmers
                            wrote on last edited by
                            #13

                            OK...in the meantime, I'd better start looking for a solution to this. Do you use the Boost libraries on your Vista system? I need a pointer on installing it.

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

                              Nope, I never was in need of using boost.

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

                              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