[英]how to run program written under linux in visual studio
Hi I'm trying to compile quite a big linux program on Visual Studio. 嗨,我正在尝试在Visual Studio上编译相当大的linux程序。 The source code is here http://public.fh-wolfenbuettel.de/~hoeppnef/fc.html I managed to overcome most problem however now I have no idea what to do. 源代码在这里http://public.fh-wolfenbuettel.de/~hoeppnef/fc.html我设法克服了大多数问题,但是现在我不知道该怎么办。 I got an error Cannot open include file: 'ext/functional': No such file or directory The problem is, that I can't find this header file, I've searched entire web and I could't find it. 我收到一个错误无法打开包含文件:'ext / functional':没有这样的文件或目录问题是,我找不到此头文件,我搜索了整个Web,但找不到。 Is there any way to run compile this application on visual stuio ? 有什么方法可以在visual stuio上运行该应用程序的编译吗? Or maybe You could recomend me good IDE on Linux (I've been always programming on Windows) It would be great if IDE on Linux had debugger as convinient as Visual's debugger 或者,也许您可以推荐给我Linux上的优秀IDE(我一直在Windows上编程)如果Linux上的IDE具有调试器像Visual的调试器一样方便,那将是很棒的
Porting this whole is going to be non-trivial. 移植整个过程并非易事。 For a start, there are portions of the code that run system commands using linux syntax. 首先,代码的某些部分使用linux语法运行系统命令。 Specifically: 特别:
if (legend)
system("awk '/^###/ { if ($3>1) printf(\",\"); printf(\"\\\"-\\\" title \\\"%s\\\" with lines %d\",$2,$3) }' < .gsv-3.tmp >> .gsv-0.tmp");
else
system("awk '/^###/ { if ($3>1) printf(\",\"); printf(\"\\\"-\\\" notitle with lines %d\",$3) }' < .gsv-3.tmp >> .gsv-0.tmp");
That from the gnuplot driver. 来自gnuplot驱动程序。
I suspect you are not looking for a major porting job and just want to run the code and tweak things. 我怀疑您不是在寻找主要的移植工作,而只是想运行代码并进行调整。 That being the case, the easiest in terms of work until results will be to use it on Linux and get used to gdb. 在这种情况下,最简单的工作是在Linux上使用它并习惯于gdb,直到获得结果为止。 Other options include trying msys/cygwin as these provide a linux-like environment but on Windows. 其他选项包括尝试使用msys / cygwin,因为它们提供了类似Linux的环境,但在Windows上。 However, unless you really want to start re-writing large chunks of the code, the app won't work whole. 但是,除非您真的要开始重新编写大量代码,否则该应用程序将无法正常运行。
I should add at this point cross platform portability (and I mean cross Unix/NT, not just amongst unices) needs to be designed in very carefully from the start of an application's development. 在这一点上,我应该补充说,从应用程序开发的开始就需要非常仔细地设计跨平台的可移植性(我的意思是跨Unix / NT,而不仅仅是在unices之间)。
There are two other suggestions which may take some effort to get working. 还有另外两个建议可能需要花一些精力才能开始工作。
Regarding the Linux IDE request; 关于Linux IDE请求; I've always used Code::Blocks & GDB under Linux and so far no problems at all. 我一直在Linux下使用Code :: Blocks&GDB,到目前为止完全没有问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.