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. Issues while building a project on Windows XP

Issues while building a project on Windows XP

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 3.0k 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.
  • S Offline
    S Offline
    subin
    wrote on last edited by
    #1

    Hi All,

    I've recently moved my actively developing simple Qt application from Linux platform to Windows. The build/run was smooth enough on Linux. I just wanted to experiment the cross-platform-ness on Windows too. Thats why I decided to move the project to Windows XP. But when building the code I see something like in the below image.

    !http://farm8.staticflickr.com/7029/6461115925_9d41a62149_b.jpg(Build Issue on Windows XP)!

    I Googled around and I got "this thread":http://stackoverflow.com/questions/3445312/swprintf-and-vswprintf-not-declared from Stackoverflow. The second answer from that thread fixed my problem. I commented out two of the lines in cwchar and everything works fine. But I'm just curios enough to know what was wrong with those two lines. Or is there any other 'legal' work around to fix the same?

    Thanks & Regards

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      The link to your image is broken.

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • S Offline
        S Offline
        subin
        wrote on last edited by
        #3

        I've just fixed it Eddy. Thanks

        1 Reply Last reply
        0
        • S Offline
          S Offline
          subin
          wrote on last edited by
          #4

          The solution to this problem was to comment out the two lines in the header files which contains vsprintf and wvsprintf. A normal comment from IRC channels on this issue was : "Just comment it out dude, its just buggy headers..." :)

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

            If you really need it, Qt provides some printf compatible methods in a platform independent manner:

            • "qvsnprintf() ":/doc/qt-4.8/qbytearray.html#qvsnprintf
            • "qsnprintf() ":/doc/qt-4.8/qbytearray.html#qsnprintf
            • "QString::sprintf() ":/doc/qt-4.8/qstring.html#sprintf

            Alternatively, you should consider using [[Doc:QString]]'s arg() methods.

            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