首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Visual Studio2012的LibLinear

使用Visual Studio2012的LibLinear
EN

Stack Overflow用户
提问于 2013-12-31 10:10:50
回答 2查看 320关注 0票数 0

如何在C++ Visual Studio2012项目中使用Liblinear (作为开发人员)?我尝试将文件"linear.h","linear.cpp","tron.h","tron.cpp“添加到我的项目中;但是还有一些额外的依赖项我无法解析,这些依赖项与位于liblinear中的"blas”目录相关。有没有人能一步一步地解释一下如何在visual studio中使用liblinear?

提前感谢!

EN

回答 2

Stack Overflow用户

发布于 2014-01-04 10:09:08

您应该将文件夹“libllined1.94\blas”中的文件添加到您的项目中。

票数 0
EN

Stack Overflow用户

发布于 2014-06-18 04:42:26

如果您不需要源代码,您可以尝试直接从位于libnear目录下的windows目录调用windows train.exe和predict.exe

代码语言:javascript
复制
        Process p = new Process();
        p.StartInfo.FileName = @"E:\liblinear-1.94\windows\train.exe";
        p.StartInfo.UseShellExecute = false;
        p.StartInfo.RedirectStandardOutput = true;
        p.StartInfo.RedirectStandardError = true;
        p.StartInfo.CreateNoWindow = false;
        p.StartInfo.Arguments = @" -s 0 E:\Data.train";

        p.Start();
        StreamReader so = p.StandardOutput;
        string a = "";
        while (!p.HasExited)
        {
            Thread.Sleep(100);
            if (!so.EndOfStream)
            {
                Console.WriteLine(so.ReadLine());

            }
        }


        if (!p.StandardError.EndOfStream)
        {
             Console.WriteLine("StdError:" + p.StandardError.ReadToEnd());

        }
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20850678

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档