LoginSignup
7
5

More than 3 years have passed since last update.

FbxSdkがVisualStudio2017でビルド出来なかったお話

Last updated at Posted at 2018-05-07

FbxSdkがVisualStudio2017でビルド出来なかったお話

2019.2にてVS2017に対応しました。以下の内容はFbxSDK 2019.2未満を使用する方向けの記事になります。

VS2019でも問題なくする事を確認済みです。

FbxSdkを持ってくる

巷でNightmare SDKとか言われてる FbxSdk2019がリリースされていたので、これを期にVisualStudio2017で新規プロジェクトを立ち上げる事にした。

早速ページに飛んでみると...
2018y05m07d_094410187.jpg

VisualStudio 2015 ま で し か 対 応 し て な い
SDKは2019なのに...

2017でも動くだろうと考え、2015版をダウンロードしインストール ここまでは順調。

何はともあれビルド

VisualStudio2017で空のプロジェクトを作成してヘッダの位置を追加してmainのみを書いてビルドしてみると...

2018y05m02d_131427133.jpg

ゑっ?

ゑっ?

原因究明

納得が行かなかったので色々調べてみる

  • FbxSDK2017を試す
     - 全く同じエラーが表示される
  • VisualStudio2015で試す  - 2019も2017もビルドに成功
    • > VisualStudio2017が生成するプロジェクトファイルに何かあるっぽい

結論から言うと、以下のオプションが悪さをしていた。
2018y05m07d_095555785.jpg

準拠モードってなんぞ? と思い調べてみる
https://blogs.msdn.microsoft.com/vcblog/2017/11/15/msvc-conformance-improvements-in-visual-studio-2017-version-15-5/

We’ve enabled the /permissive- conformance mode by default with new projects created in Visual C++, enabling you > to write code that is much closer to C++ standards conformance. This mode disables non-conforming C++ constructs that have existed in MSVC for years. You can learn more about our conformance mode and the /permissive- switch that controls it in this blog post or on docs.microsoft.com.

要約すると、
・(VisualStudio2017で)新規でプロジェクト作ると勝手に ON になる
・MSVCが認識できる非標準のC++構文を無効にする

とのこと。

7
5
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
7
5