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