Can't run C-file

Hello there,

I use a program named Ox, based on C. Unfortunately, I am only able to run the standard samples given by Ox. When I produce a code I need to save it in the same directory where Ox is installed. But here comes the clue: I get a error saying

'No write permission to path:

Do you wish to try another folder?’

From the / I am not allowed to save in that or its subdirectories.

Does anynone know how to solve it?

Thanks in advance!

You may try to save the files inside any folder on your desktop, or document’s directory. How are you being sure that you can’t allowed to save in / onwards? Atleast you can save files in /home/‘your username’/. Path to desktop is /home/‘ur usrnam’/Desktop

As a normal user you should not have access to writing things in a system directory like /usr/share. That is correct. You should use your home directory or a directory therein to put things. And then tell your tool where to find it.

Hee thanks for the quick reply guys :slight_smile:

You’re right, I can save in my home directory and I shouldn’t be able to save in /usr/share/…
But when I save in my home or one of its subdirectories and run it in Ox, it gives the following error

Ox Console version 5.10 (Linux_64) (C) J.A. Doornik, 1994-2008
This version may be used for academic research and teaching only
/home/leeuwtjes/Desktop/zooi/Econometrics/new08.ox (5): ‘dec1’ undeclared identifier
/home/leeuwtjes/Desktop/zooi/Econometrics/new08.ox (5): ‘;’ expected but found '<identifie
/home/leeuwtjes/Desktop/zooi/Econometrics/new08.ox (5): ‘a’ undeclared identifier
/home/leeuwtjes/Desktop/zooi/Econometrics/new08.ox (5): ‘mX’ undeclared identifier
/home/leeuwtjes/Desktop/zooi/Econometrics/new08.ox (5): ‘sX’ undeclared identifier

Ox reports errors: exit code= 1!!

According to my teacher, it has something to do with user rights…?

I do not know what ox is, but the mesages look like coming from a compiler that finds errors in the source of the program it is compiling. I do not see any connection with user permissions.

Well, the first one (‘dec1’ undeclared identifier ) may be due to the fact that an include file could not be read, but there is no error about the msssing or unreadable include.

The second one is typicaly for a mistyped/syntacticaly wrong statement.

So what is your teachers argument?

Btw the (5) may be the line number of the input. So looking carfully to the first 5 lines of your program may give more information.

First of all Ox source files are not "C-file"s. They look similar but the languages are different.

I think you are using the Ox interpreter for Linux and using oxl command to run the program. It looks like you have syntax errors in your program as hcvv pointed out. I am not an Ox expert but still I can point out syntax errors if you can post your program here.

Hee thank you guys, I probably made a mistake with the interpretation of the declaration. As a rookie I have interpreted decl as a dec1 (a number instead of the letter).

So thanks for your comments.

Btw my teacher is nothing to blame for he was not able to review my code.