sdcc missing library issue

Discussion in 'Embedded Systems and Microcontrollers' started by scsi050, Feb 27, 2014.

  1. scsi050

    Thread Starter New Member

    Feb 27, 2014
    2
    0
    I'm trying to get a very simple C code compiled with sdcc, but I can't get past this missing lib file error:

    Code ( (Unknown Language)):
    1. root@server:/home/xxxx/testpic# sdcc -mpic14 -p16f877 test.c
    2. pic16f877.lib: No such file or directory

    SDCC version on Debian:
    SDCC : mcs51/gbz80/z80/z180/r2k/ds390/pic16/pic14/TININative/ds400/hc08 3.1.0 #7066 (Jun 5 2012) (Linux)

    test.c :
    Code ( (Unknown Language)):
    1.  
    2. #include <string.h>
    3.  
    4. char strl[10];
    5.  
    6.  
    7. void main(void) {
    8.         strcpy(strl, "testing");
    9. }
    10.  


    Any suggestions? thanks
     
  2. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,012
    That is the linker library file for the pic. Are you using a 16f877? Do you have the directory set correctly ?

    What is sdcc??
     
  3. scsi050

    Thread Starter New Member

    Feb 27, 2014
    2
    0
    Yes i'm using a p16f877 (but regardless of which actual chip I'd be programming, it should be able to compile regardless, as long as I have the necessary compiler files).

    I'm not sure if I have the directory set correctly or not. No where on my filesystem can I find the file p16f877.lib

    Code ( (Unknown Language)):
    1. root@server:~# sdcc --print-search-dirs
    2. programs:
    3. /usr/bin
    4. datadir:
    5. /usr/bin/../share
    6. /usr/share
    7. includedir:
    8. /usr/bin/../share/sdcc/include/mcs51
    9. /usr/share/sdcc/include/mcs51
    10. /usr/bin/../share/sdcc/include
    11. /usr/share/sdcc/include
    12. libdir:
    13. /usr/bin/../share/sdcc/lib/small
    14. /usr/share/sdcc/lib/small
    15. libpath:




    sdcc (http://sdcc.sourceforge.net/) is a C compiler that i'm trying to use to compile by C code into the HEX assembly file.
     
  4. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,012
    Then you need to talk to someone on sdcc. I doubt you will find support for it here. Most likely you need to install a linker library in addition to the complier.

    If you install XC8 or MPLab C you won't have all of these issues.
     
Loading...