"The problem is that inttypes.h is a C99 header, and in general inttypes.h is not compatible with ISO/C++." Or put more correctly, most compilers are not yet compatible with ISO C99. MSVC in particular will never be compatible.
On Mon, Sep 7, 2009 at 3:54 PM, Roberto Raggi <[email protected]>wrote: > Hi Lars, > > On Sep 7, 2009, at 3:15 PM, ext Lars Hartmann wrote: > > > Hi, > > > > QT Creator seems to have a problem with string-macros in function > > arguments as the macros provided by inttypes.h. > > > > This line: > > > > printf("%"PRIi64, someint); > > > > is marked as an error ("expected token ')' got 'PRIi64')"), for those > > who aren't familiar with inttypes.h: it provides macro-strings to be > > used inside of printf or scanf to print/scan exact-size integers, for > > example: PRIi64 expands to "d" on x86_64. > > The problem is that inttypes.h is a C99 header, and in general > inttypes.h is not compatible with ISO/C++. > > $ cat x.cpp > > #include <inttypes.h> > #include <cstdio> > > int main() > { > int someint; > printf("%" PRIi64, someint); > } > > > $ g++ x.cpp > x.cpp: In function ‘int main()’: > x.cpp:8: error: expected `)' before ‘PRIi64’ > > > ciao robe > > > _______________________________________________ > Qt-creator mailing list > [email protected] > http://lists.trolltech.com/mailman/listinfo/qt-creator >
_______________________________________________ Qt-creator mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-creator
