6 Replies Latest reply on Jul 28, 2010 7:23 PM by tedk

    Can't link, failing to find __isoc99_fscanf?


      Greetings all.  Posting here so others can find whatever resolution we come up with...


      I'm compiling a program for the cores (cross-compiled with icc -mcpu=pentium.......) that includes fscanf().  I get a valid object file, but the linker doesn't find the library that contains fscanf(), after name-mangling to "__isoc99_fscanf", and therefore get no executable.

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

      Poking around the libraries with strings and grep wasn't helpful (otherwise I could add an explicit link in my compile flags).  fopen() and fclose() work just great.


      In the meanwhile, fgets() also links OK, and I can take apart my string from there.  But I wanted to raise the issue in case the crosscompile libraries are missing something(s) that others will run across.