Results 1 to 7 of 7

Thread: Can't run C-file

  1. #1

    Default 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:
    /usr/share/

    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!

  2. #2
    Join Date
    Nov 2008
    Location
    India
    Posts
    122

    Default Re: Can't run C-file

    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

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,136

    Default Re: Can't run C-file

    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.
    Henk van Velden

  4. #4

    Default Re: Can't run C-file

    Hee thanks for the quick reply guys

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

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,136

    Default Re: Can't run C-file

    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.
    Henk van Velden

  6. #6
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    1,770

    Default Re: Can't run C-file

    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.
    openSUSE 12.3 (x86_64) with Kernel 3.7.10-1.16-desktop and KDE 4.11.2 on MacBook Pro
    Latest MS Windows version used: Win95

  7. #7

    Default Re: Can't run C-file

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •