該当のソースコード
C++
1 #if defined snprintf 2 // This definition of snprintf will generate "warning C4005: 'snprintf': macro 3 // redefinition" with a subsequent line indicating where the previous definition 4 // of snprintf was. This makes it easier to find where snprintf was defined. 5 #pragma warning(push, 1) 6 #pragma warning(1: 4005) 7 #define snprintf Do not define snprintf as a macro 8 #pragma warning(pop) 9 #error Macro definition of snprintf conflicts with Standard Library function declaration 10 #endif 11
発生している問題・エラーメッセージ
torcsというオープンソースコードのカーシュミレーションソフトのプロジェクトファイルをコンパイルしたいと考えています. そこで,Visual studio 2017においてビルドを行うとエラーが発生してしまいます. 2000行程あり,全てのコードを載せることはできませんが,上記の #error Macro definition of snprintf conflicts with Standard Library function declarationの部分でエラーが発生しています. 対策としてどのようなことが考えられるでしょうか. 宜しくお願い致します. 重大度レベル コード 説明 プロジェクト ファイル 行 抑制状態 エラー C1189 #error: Macro definition of snprintf conflicts with Standard Library function declaration tgf c:\users\owner\desktop\torcs-1.3.7\stdio.h 1935
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/12/10 11:24
2018/12/10 12:07
2018/12/11 04:35