簡體   English   中英

swprintf和vswprintf沒有聲明?

[英]swprintf and vswprintf not declared?

我試圖用MinGW在Windows上編譯Botan,並在編譯期間收到以下錯誤:

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

為什么沒有聲明swprintf和vswprintf,我該如何解決這個問題呢?

試着投入

#undef __STRICT_ANSI__ 

在包括stdio.h之前

使用MinGW(Qt 2010.05)編譯Grantlee有同樣的問題。

我如何編譯:

  • 找到文件cwchar(C:\\ Qt \\ 2010.05 \\ mingw \\ lib \\ gcc \\ mingw32 \\ 4.4.0 \\ include \\ c ++ \\ cwchar)
  • 評論以下內容(第160行)

    using :: swprintf;

    using :: vswprintf;

運行時make確保未設置-ansi標志。 如果正在使用此標志,則將其刪除,問題將得到解決。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM