5 Replies Latest reply on Jul 25, 2011 12:40 PM by Felix999

    Link error with fscanf, and general question about SCC and files




      I'm compiling a big application for the SCC cores.  I get a linker error related to fscanf.  I have reproduced the error by writing a tiny program:


      #include <stdio.h>


      int main()
        fscanf(0, 0);
        return 0;


      I do:


      icc -DSCC -static -mcpu=pentium -gcc-version=340 temp.c


      (after sourcing crosscompie.sh)


      and I get:


      /tmp/iccxUmvdA.o(.text+0x16): In function `main':
      : undefined reference to `__isoc99_fscanf'


      In my real application, I don't actually need to use fscanf, and when I comment out all occurrences of it, the application links and runs.  However, this is a pain to do, as the the code is auto-generated and includes these calls.  Also, I'd be interested to know why this function is missing.


      Second, and perhaps unrelatedly, I don't really understand how files work when one boots Linux on an SCC code.  If I boot Linux on core rck00, I can ssh into this core, and create a file.  Where does this actually get created?  Is it on the MCPC disk somehwhere, or just in a RAM disk?  When I reset the cores and boot Linux again, the file is gone.