Weird! sysace_fwrite() cannot be found!!!???

Jun 06, 2007 2 Replies

Hi everyone,



I run into a weird erorr. sysace_fwrite() cannot be found.



--------------------------------------------------------------------------- undefined reference to `sysace_fwrite' collect2: ld returned 1 exit status make: *** [CF_demo/executable.elf] Error 1



---------------------------------------------------------------------------



Xilfatfs lib is chosen and included in the main.c, as follow. If I comment out sysace_fwrite, no errors come up during compilation. How come can edk only find sysace_fread but sysace_fwrite? Any input would be appreciated!



Thanks in advance,


Yao


---------------------------------------------------------------------------------------------------------------------------------------------------------------------- #include "xparameters.h" #include "xutil.h" #include "xio.h"



#include


int main(void) {



char* file1 = "input.bin"; char* file2 = "result.bin";



SYSACE_FILE* infile1, *infile2;



int i, numread, numwrite;



unsigned char Buffer[1];



/** Open the dummy files and read a data**/ infile1 = sysace_fopen(file1, "r"); infile2 = sysace_fopen(file2, "w");



for(i=0; i


--

--

--=AD----------------------------------------------------------------------=

-----=AD----------------

The problem was solved by switching on a serect setting inside Software Platform Setting/OS and Libraries/Configuration for Libraries, expand it. Turn on CONFIG_WRITE.

Hope this would help someone who runs into the same problem.

Yao

Make sure you have write support enabled. Check your s/w platform settings.

-Siva

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required