simonyoyo
Newbie level 1

Hello,
Have everyone ever used the "fopen" on Nios?
The C code:
void main()
{
FILE *fp;
fp=fopen("a.out","rb");
fclose(fp);
}
The error messages in below:
--------------------
Beginning Build
--------------------
Sources:
jpeg.c
# (*) nios-elf-gcc -I ../inc -I ../../inc -I ../../../inc -g -O2 -m32 jpeg.c -o jpeg.c.o -c
jpeg.c:1089:2: warning: no newline at end of file
jpeg.c: In function 'FINAL_byte':
jpeg.c:526: warning: comparison is always false due to limited range of data type
# (*) nios-elf-ld -e _start -u _start -g -T /usr/altera/excalibur/nios-sdk/bin/nios.ld ../../lib/obj32/nios_jumptostart.o jpeg.c.o -lnios32 -lc -lm -lgcc -lc -lnios32 -L/usr/altera/excalibur/nios-elf/lib/m32/ -L/usr/altera/excalibur/lib/gcc-lib/nios-elf/2.9-nios-010625/m32/ -L../lib -L../../lib -L../inc -L../../inc -L../../../inc -o jpeg.out
/usr/altera/excalibur/nios-elf/lib/m32//libc.a<openr.o>:In function '_open_r':
openr.o<.text+0x14>:undefined reference to '_open'
openr.o<.text+0x16>:undefined reference to '_open'
openr.o<.text+0x18>:undefined reference to '_open'
openr.o<.text+0x1a>:undefined reference to '_open'
### nios-build error: last system call returned256
Died at - line 27.
Please tell me how to do this on Nios. Thanks!!
Have everyone ever used the "fopen" on Nios?
The C code:
void main()
{
FILE *fp;
fp=fopen("a.out","rb");
fclose(fp);
}
The error messages in below:
--------------------
Beginning Build
--------------------
Sources:
jpeg.c
# (*) nios-elf-gcc -I ../inc -I ../../inc -I ../../../inc -g -O2 -m32 jpeg.c -o jpeg.c.o -c
jpeg.c:1089:2: warning: no newline at end of file
jpeg.c: In function 'FINAL_byte':
jpeg.c:526: warning: comparison is always false due to limited range of data type
# (*) nios-elf-ld -e _start -u _start -g -T /usr/altera/excalibur/nios-sdk/bin/nios.ld ../../lib/obj32/nios_jumptostart.o jpeg.c.o -lnios32 -lc -lm -lgcc -lc -lnios32 -L/usr/altera/excalibur/nios-elf/lib/m32/ -L/usr/altera/excalibur/lib/gcc-lib/nios-elf/2.9-nios-010625/m32/ -L../lib -L../../lib -L../inc -L../../inc -L../../../inc -o jpeg.out
/usr/altera/excalibur/nios-elf/lib/m32//libc.a<openr.o>:In function '_open_r':
openr.o<.text+0x14>:undefined reference to '_open'
openr.o<.text+0x16>:undefined reference to '_open'
openr.o<.text+0x18>:undefined reference to '_open'
openr.o<.text+0x1a>:undefined reference to '_open'
### nios-build error: last system call returned256
Died at - line 27.
Please tell me how to do this on Nios. Thanks!!