Altera_Forum
Honored Contributor
15 years agoNios Errors: "First Defined Here" and "Multiple Definitions" for a single line
Hi Guys,
Long stopry short i'm pulling my hair out about a wierd errors and done all sorts of trials to find out what it is. what i'm doing I have two functions, 1 i made myself (get_de2_115_mac_addr) and a second i have copied from another project (FindLastFlashSectorOffset). I have them working if i leave them in a single file inich_init.c. What i want to do is move them to a seperate file sss_de2_115.c. errors shown in the attached image. By moving these functions into a seperate .c file i get the two errors for each function . "first defined here : sss_de2_115.c line 34" and "multiple definition of 'get_de2_115_mac_addr' : sss_de2_115.c line 34" The error pair for each function refer to the same f'n line! This is the only place they are mentioned or defined. I have tried doing it with or without a function protoype at the start of the file SSS_DE2_115.c. Still get the error. #includes Inich_init# includes SSS_De2_115, but the latter doesn't# include the former. SSS_DE2_115 does include some of the same headers as iniche_init but these are to prevent file type compile errors etc. To my knowledge these are system headers and shouldn't create a circular reference (i hope). any help would be much appreciated. Code is attached as text files.