On Fri, 6 Jul 2018 at 20:46, Vahith .j <vahith@xxxxxxxxx> wrote: > > Hi > Can you tell me any code change required when we are migrating from gcc > 4.1.x version to gcc 4.8.x and any reference link for migrating code to new > compiler I already told you: remove the bad declaration of getline. This is not a general "migrating from gcc 4.1.x version to gcc 4.8.x problem". It compiled previously, maybe by chance or maybe because you had a different glibc, which is not part of gcc, and so nothing to do with migrating to a newer gcc. For whatever reason, now it doesn't compile, because there are two different declarations for getline. getline is a standard function, defined by POSIX, so it will be defined by <stdio.h> and any code that includes <stdio.h> cannot declare a different function called getline. So as I already said, remove the bad declaration. Rename it, or remove it, or whatever you need to. But you have to fix it. > > > > On Friday, July 6, 2018, Vahith .j <vahith@xxxxxxxxx> wrote: > > > Hi All G'Day., > > > > i am facing one issue when migrating my code to gcc 4.1 to 4.8, can you > > provide step to take for migration.. > > > > *problems facing: * > > when i use gmake command on the my cpp code in gcc 4.1, it compiles fine > > and executing but same code when i using in gcc 4.8 version its giving > > below exception can you explain cause and solution for same > > > > error: > > *cc -c -o include.o include.c* > > *In file included from include.c:30:0:* > > *def.h:131:9: error: conflicting types for ‘getline’* > > * char getline();* > > * ^* > > *In file included from def.h:31:0,* > > * from include.c:30:* > > */usr/include/stdio.h:678:20: note: previous declaration of ‘getline’ was > > here* > > * extern IO_ssize_t getline (char restrict _lineptr,* > > > > > > > > Thanks in Advance > > vahith.j > > > > > > -- > regards > vahith.j > (9008038503)