LoginSignup
6
3

More than 5 years have passed since last update.

VS2015で__imp_printfが見付からない

Posted at

現象

古いVisualStudioで作ったプロジェクトをVisualStudio2015でビルドしようとすると、
エラー LNK2001 外部シンボル "__imp_printf" は未解決です。
エラー LNK2019 未解決の外部シンボル __imp__snprintf が関数 *** で参照されました。
といったエラーが出てしまった。

原因

VisualStudio2015ではprintf()やscanf()関係がガラっと変わっているらしい。

対策

リンカーの入力オプションで依存ライブラリとして legacy_stdio_definitions.lib を加えるとよい。

参考

Updated to VS 2015 and now get Unresolved External Errors

6
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
3