1. euc problems in linux?

I am not sure if euc is working properly or not. I am just following the manual. When I run eui myproj.ex the output is as expected. However when using resultant euc file the system says command not found. I must be doing something wrong.

root@anthill:/usr/share/euphoria/tutorial# eui myproj.ex 
Hello, I am an interpreted program. 
root@anthill:/usr/share/euphoria/tutorial# euc -con myproj.ex 
Translating code, pass: 1 2 3  generating 
Compiling with GCC 
Compiling  14% init-.c 
Compiling  57% myproj.c 
Compiling  85% main-.c 
Linking 100% myproj 
root@anthill:/usr/share/euphoria/tutorial# ls -all myproj 
-rwxr-xr-x 1 root root 179010 2010-11-04 02:33 myproj 
root@anthill:/usr/share/euphoria/tutorial# myproj 
myproj: command not found 

Thanks.

new topic     » topic index » view message » categorize

2. Re: euc problems in linux?

Anthill said...

root@anthill:/usr/share/euphoria/tutorial# ls -all myproj 
-rwxr-xr-x 1 root root 179010 2010-11-04 02:33 myproj 
root@anthill:/usr/share/euphoria/tutorial# myproj 
myproj: command not found 

On Linux, the current directory is not usually in your path, as it is on Windows. So you need to do:

$ ./myproj 

Matt

new topic     » goto parent     » topic index » view message » categorize

3. Re: euc problems in linux?

Thanks. Works. I new it must have been something simple.

new topic     » goto parent     » topic index » view message » categorize

4. Re: euc problems in linux?

Just as a side note it's not generally good practice to use root for an every day account. Root user can do anything it wants, which can lead to all sorts of problems with just one typo. Generally you should create a user account and use it for everything you do and only use root when you need to make system changes.

Jeremy

new topic     » goto parent     » topic index » view message » categorize

5. Re: euc problems in linux?

I concur with Jeremy on not using root.
Consider the following commands:

cd
rm -Rf *

versus

cd \
rm -Rf *

You were attempting to delete everything from your user home directory.
The top two commands, not using root would do that - the bottom two commands,
if you were using root, would delete everyting - your whole linux is gone.
The only difference was a single slash! Easy mistake to make.
And Linux does not have a recycle bin when using the command line.
"Been there, done that, got the tee shirt"

Regards
Alan

new topic     » goto parent     » topic index » view message » categorize

6. Re: euc problems in linux?

Hi

That's not a mistake, it's a learning experience.

Chris

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu