// プロジェクトの設定で「C/C++」のカテゴリ「コード生成」で // 呼出し規約を__stdcallに、構造体メンバのアライメントを4バイトに、 // また、「リンク」でMAPファイルを生成にチェックして下さい #define DLL_EXPORT __declspec(dllexport) extern "C" { DLL_EXPORT double ErlnB(short n,double e); } double ErlnB(short n,double e) { double d = 1.; int i; for (i=1;i<=n;++i) { d *= e; d = d / (i + d); } return d; }