开发者

how to run program written under linux in visual studio

Hi I'm trying to compile quite a big linux program on Visual Studio. 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. 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. Is there any way to run compile this application on 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


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. 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.

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. Other options include trying msys/cygwin as these provide a linux-like environment but on 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.

There are two other suggestions which may take some effort to get working.

  • Pull out the pieces you need. This shouldn't be too difficult. Yes, you might need to re-write some of the logic/prune out some linux-only features, but it should be possible.
  • Eclipse is a good IDE for Linux that gives you C++ support. I've never tried it in terms of debugging as I tend to stick to gdb but for Java it is very good. Might be worth a shot.


Regarding the Linux IDE request; I've always used Code::Blocks & GDB under Linux and so far no problems at all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜