Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6191425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:45:44+00:00 2026-05-24T02:45:44+00:00

So far I’ve written all my code in visual studio and now I need

  • 0

So far I’ve written all my code in visual studio and now I need to add some UI to it so I’m going to use Qt. So I added every file In my project (except main class) and then tried compiling it using Qt. since I’ve used some c++0x features I had to add this line to project file :

QMAKE_CXXFLAGS += -std=c++0x

then I tried compiling it. there are only two errors (there may be more but compiler stops on these two)

In file included from d:\qt\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/bits/postypes.h:42,

                 from d:\qt\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/iosfwd:42,

                 from d:\qt\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/ios:39,

                 from d:\qt\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/ostream:40,

                 from ../TranslatorBase/ttObject.h:5,

                 from ../TranslatorBase/ttArray.h:5,

                 from ../TranslatorBase/ttArray.cpp:1:

d:\qt\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cwchar:159: error: '::swprintf' has not been declared

d:\qt\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cwchar:166: error: '::vswprintf' has not been declared

I don’t have any idea why there should be such an error. and to make sure I first tried to compile same project using cygwin/gcc using this command :

gcc -std=c++0x TranslatorBase/ttArray.cpp -c -o ttArray.o

there is no error there it compiles even without any warnings. In fact every file in my project compiles without any warnings there.

I’m now using Qt Creator v2.0.1 based on Qt v4.7.0 and it’s using mingw/gcc v4.4.0

–edit–

just a new thing I’ve found, even without my source files (only with Qt generated files) there is still compilation error. it seems there is a problem with the gcc I’ve got.

@Troubadour Qt generated this command:

g++ -c -std=c++0x -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'd:/Qt/qt/include/QtCore' -I'd:/Qt/qt/include/QtGui' -I'd:/Qt/qt/include' -I'd:/Qt/qt/include/ActiveQt' -I'debug' -I'.' -I'../TranslatorUI' -I'.' -I'd:/Qt/qt/mkspecs/win32-g++' -o debug/ttArray.o ../TranslatorBase/ttArray.cpp
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:45:45+00:00Added an answer on May 24, 2026 at 2:45 am

    as Troubadour suggested, it’s a problem with mingw, that when you add -std=c++0x flag to compile options, mingw automatically adds -ansi flag too, so to fix that I added -U__STRICT_ANSI__ flag to compile options. problem fixed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As far as I know some company will use Devexpress to speed up the
As far as I understand, every string is an object in Javascript. Still, it
as far as I can get gowalla auth code response contains both expires_at and
So far all the sites I have made have been in PHP, I'm thinking
So far I have been using in tutorials, examples and sample code only packages
So far i got this code: function toplist() {$sql = SELECT * FROM list
So far my code stops the sound but once it has stopped the sound
So far i wrote a code to download a file from ftp server then
So far i have the following code, but it doesn't seem to be working,
As far as I see every time I make a change, for example the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.