当我通过集成了 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.
我尝试重新安装程序,但它不起作用。我还尝试将其放入包含 Matrix 的文件夹中,但它不起作用。StackOverflow Q中建议了此解决方案。
我正在运行 64 位 Windows 7!该应用程序是 32 位的。有两个dll。一个在名为 i386 的文件夹中,另一个在 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.");
}
}
}
}
}