Altera_Forum
Honored Contributor
13 years agoundefined reference to `fopen'
Hi Everyone,
I have a probelm with using Nios II Build for Eclipse... I wrote a small C program trying to read from a file, and I get an error "C:\altera\mysopc_nios_sram\software\mySRAM_image/hello_world_small.c:117: undefined reference to `fopen' my program is very simple, and I am including all the correct includes # include "sys/alt_stdio.h"# include <stdio.h># include <string.h># include <stdlib.h># include "system.h"# include "altera_avalon_pio_regs.h" ............... if( ( InputFile1 = fopen(name_in1, "r") ) == NULL) printf("Input File 1 can not be opened \n"); please help, Thank you :)