R が統合されている Visual Studio 2010 で ac# アプリケーションを実行すると、次のエラーが表示されます。The program can't start because Rlapack.dll is missing from your computer. Try reinstalling the program to fix this problem.
プログラムを再インストールしようとしましたが、機能しませんでした。マトリックスが入っているフォルダにも入れてみましたが、うまくいきませんでした。この解決策はStackOverflow Qで提案されました。
64 ビットの Windows 7 を実行しています。アプリケーションは 32 ビットです。dll が 2 つあります。1 つは i386 というフォルダーにあり、もう 1 つはフォルダー x64 にあります。
これが私のコードです:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using RDotNet;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
string dlldir = @"D:\Program Files\R-2.15.0\bin\i386";
bool r_located = false;
while (r_located == false)
{
try
{
REngine.SetDllDirectory(dlldir);
REngine.CreateInstance("RDotNet");
r_located = true;
}
catch
{
MessageBox.Show(@"Unable to find R installation's \bin\i386 folder.
Press OK to attempt to locate it.");
}
}
}
}
}