Protocol Buffers(C++)の導入方法

Protocol Buffers(C++)の導入の備忘録。 WindowsではVisual Studioを、MacではXcodeを使いました。 インストール Windows Windowsの場合、vcpkgを使う方法が簡 …

Continue reading ‘Protocol Buffers(C++)の導入方法’ »

「__declspec’ attributes are not enabled」のエラーメッセージが表示されるとき

XcodeでC++のダイナミックリンクライブラリを作成しているとき、 ‘__declspec’ attributes are not enabled; use ‘-fdeclspec’ or ‘-fms-extensio …

Continue reading ‘「__declspec’ attributes are not enabled」のエラーメッセージが表示されるとき’ »

C/C++で作成したDLLをC#で使うサンプル

C/C++でDLLを作成して、C#で使うサンプルコードです。 サンプルコード サンプルコード(Windows用) 開発環境:Visual Studio 2017 DLLから返値の数値を受け取る C/C++から数値を受け取 …

Continue reading ‘C/C++で作成したDLLをC#で使うサンプル’ »

Visual Studioでstd::min()/std::max()がエラーになるときの回避策

C++11からstd::minとstd::maxは複数の引数を受け取ることができるようになりました。 #include <algorithm> int i = std::min({1, 2, 3, 4}); …

Continue reading ‘Visual Studioでstd::min()/std::max()がエラーになるときの回避策’ »