はなちるのマイノート

Unityをメインとした技術ブログ。自分らしくまったりやっていきたいと思いますー!

【XCode】'__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributesというエラーの対処法

はじめに

XCodec++のライブラリを作成しようとしたところ、以下のようなエラーが出てきてしまいました。

'__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes

一応解決できたので対処法をメモしておきます。

対処法

対処法

上の画像を参考にしながら、Custom Compiler FlagsOther C++ Flags-fdeclspecを追加すればOKです。