"program.c: No such file ...&quot...

Help
2010-02-03
2013-03-12
  • Joakim Carlsson

    Joakim Carlsson - 2010-02-03

    Hi,

    I've been trying to get sdcc working on my laptop, but for some reason I get a weird error. It works fine on my other 2 machines, but unfortunately this is the one I really need it for.

    I'm trying to compile this trivial nonsense program:

    #include "pic16f690.h"
    int test;
    void main()
    {
         test = 1;
    }
    

    Running sdcc (flags omitted, it works somewhat anyway on my other machines) gives me this error message:

    sdcpp.exe: error: program.c: No such file or directory at 1: warning 190: ISO C forbids an empty source file

    The directory contains the file program.c and pic16f690.h and the path is set up correctly on my Windows 7 system. I've tried both the Feb 2nd and the Feb 1st builds without luck. I'm currently running the Feb 2nd one.

    SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 2.9.7 #5669 (Feb 2 2010) (MINGW32)

    It would be really nice if someone could aid me here cos I really need to get this working asap.

    Thanks in advance.

     
  • William

    William - 2010-02-03

    try:

    int main()

     
  • Joakim Carlsson

    Joakim Carlsson - 2010-02-04

    Didn't work :-(

    The code seems to be fine anyway since it compiles on my other machines.

     
  • Joakim Carlsson

    Joakim Carlsson - 2010-02-04

    Update:

    I managed to get it working by providing the full path to the file being compiled instead of just a relative one. Any thoughts on what's causing this behavior?

     
  • Massimo Spataro

    Massimo Spataro - 2010-02-04

    #define __16F690
    #include "pic/pic16f690.h"

    int i;

    void main(void)
    {
       i = 10;
    }

    Use this sample for rebuild

    // end source

     
  • Borut Ražem

    Borut Ražem - 2010-02-04

    Compile it with -V option and post the result.

    sdcc -V …

    Borut

     
  • Joakim Carlsson

    Joakim Carlsson - 2010-02-05

    This doesn't seem to be a code issue as it never gets to the point of actually trying to compile it.

    sdcc -mpic14 -p16F690 -V program.c
    

    produces

    + C:\PROGRA~1\SDCC\bin\sdcpp.exe -nostdinc -Wall -obj-ext=.o -DSDCC_MODEL_SMALL-DSDCC=297 -DSDCC_REVISION=5669 -DSDCC_pic14 -D__pic14 -DSDCC_PROCESSOR="16F690" -isystem "C:\Program Files\SDCC\bin\..\include\pic14" -isystem "C:\Program Files\SDCC\bin\..\include" -isystem "C:\Program Files\SDCC\bin\..\include\pic"  "program.c"
    sdcpp.exe: error: program.c: No such file or directory at 1: warning 190: ISO C forbids an empty source file

    And using the absolute pathway I get

    + C:\PROGRA~1\SDCC\bin\sdcpp.exe -nostdinc -Wall -obj-ext=.o -DSDCC_MODEL_SMALL -DSDCC=297 -DSDCC_REVISION=5669 -DSDCC_pic14 -D__pic14 -DSDCC_PROCESSOR="16F690" -isystem "C:\Program Files\SDCC\bin\..\include\pic14" -isystem "C:\Program Files\SDCC\bin\..\include" -isystem "C:\Program Files\SDCC\bin\..\include\pic"  "c:\testfan\program.c"
    + C:\PROGRA~1\gputils\bin\gpasm.exe -c "program.asm"
    program.asm: No such file or directory
    + C:\PROGRA~1\gputils\bin\gpasm.exe -c "program.asm" returned errorcode 1

    So even if I feed it with an absolute path, it still chokes in the next stage of execution. I've tried looking for an option that forces sdcc to use absolute paths but I haven't had any luck so far. I'm not even sure if this is a Windows issue or an issue specific to sdcc. The other machines I've tried it on has succeeded though where one uses Win7 and two uses WinXP.

     
  • Borut Ražem

    Borut Ražem - 2010-02-05

    This is very strange: I don't see any mistake…

    What happen if you run sdcpp directly?

    sdcpp  program.c

    Borut

     
  • Joakim Carlsson

    Joakim Carlsson - 2010-02-05

    Same error still:

    sdcpp.exe: error: program.c: No such file or directory at 1: warning 190: ISO C forbids an empty source file

    :(

     
  • Borut Ražem

    Borut Ražem - 2010-02-05

    Unbelievable…

    What if you rename program.c to something else, for example t.c?

     
  • Joakim Carlsson

    Joakim Carlsson - 2010-02-05

    It's indeed unbelievable :/ Renaming it doesn't change much I'm afraid. I even tried to put the file in the SDCC/bin thinking it might try to execute from there but that didn't work either.

     
  • Jeffrey Sun

    Jeffrey Sun - 2010-05-26

    I hope it's not too late to answer your question.
    I also encounter this problem. Try to append the option '-I' to specify the path of the file pic16f690.h when you compile it.

     
  • Oliver Sedlacek

    Oliver Sedlacek - 2010-09-15

    What OS are you running on? What environment variables have you got set?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks