Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Problem running project in console
Problem running project in console [message #247597] Mon, 04 February 2008 05:52 Go to next message
Eclipse UserFriend
Originally posted by: craigjohansen.hotmail.com

I am running Eclipse SDK 3.2.2 in Ubuntu.

I am running an example (written in C) using the libfann2 library. The
program compiles (called cascade_train.c) fine but there is an error when
I run the program that I compiled:

FANN Error 1: Unable to open configuration file
"../benchmarks/datasets/mushroom.train" for reading.

This error does not occur when I run the program directly in the terminal
by typing: ./cascade_train

When debugging in eclipse, the error occurs when it reaches this point in
the source code:

train_data =
fann_read_train_from_file("../benchmarks/datasets/mushroom.train ");

This is most likely a really simple problem, where Eclipse is inhibiting
the program from finding the folder ../benchmarks/datasets/mushroom.train

Any help would be greatly appreciated.

Craig
Re: Problem running project in console [message #247607 is a reply to message #247597] Mon, 04 February 2008 06:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: craigjohansen.hotmail.com

I have imported the files from ../benchmarks/datasets into my workspace
and I have changed the line from:

train_data =
fann_read_train_from_file("../benchmarks/datasets/mushroom.train ");

to:

train_data = fann_read_train_from_file("mushroom.train");

And it works fine (so it is not a problem of opening the particular files
in eclipse, just when I ask it to open it outside of the workspace). So,
this method allows the program to run fine in both the eclipse console and
the terminal window.

But, I don't want to have to import every file that I need for it to work.
Any ideas how to fix this properly?

Craig
Re: Problem running project in console [message #247612 is a reply to message #247607] Mon, 04 February 2008 07:38 Go to previous message
Eclipse UserFriend
Originally posted by: dmsubs.NOSPAM.consertum.com

Try setting CWD
--
Derek


craig wrote:
> I have imported the files from ../benchmarks/datasets into my workspace
> and I have changed the line from:
> train_data =
> fann_read_train_from_file("../benchmarks/datasets/mushroom.train ");
>
> to:
>
> train_data = fann_read_train_from_file("mushroom.train");
>
> And it works fine (so it is not a problem of opening the particular
> files in eclipse, just when I ask it to open it outside of the
> workspace). So, this method allows the program to run fine in both the
> eclipse console and the terminal window.
>
> But, I don't want to have to import every file that I need for it to
> work. Any ideas how to fix this properly?
>
> Craig
>
Previous Topic:C Bug
Next Topic:Job scheduling
Goto Forum:
  


Current Time: Tue Jul 16 06:40:11 GMT 2024

Powered by FUDForum. Page generated in 0.09291 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top