On Sat, 23 Mar 2019 at 15:15, Vinaya Dandur <mail2vin...@gmail.com> wrote: > > Dear Developers, > > It is unfortunate that I am facing this issue and to my bad luck, I do not > see an answer on google as well. > > Problem: > > I have downloaded and compiled GCC 4.8.1 with the below configure options > on SLES 12 and post installation, created soft links cc c++ gcc and g++ to > point to gcc-4.8.1 and g++-4.8.1 . > > ./configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man > --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-checking=release > --enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/ > --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap > --with-slibdir=/lib64 --enable-__cxa_atexit > --enable-libstdcxx-allocator=new --disable-libstdcxx-pch > --enable-version-specific-runtime-libs --program-suffix=-4.8.1 > --enable-linux-futex --without-system-libunwind --with-cpu=generic > --build=x86_64-suse-linux --disable-multilib --enable-languages=c,c++ > > A simple .c program would copilte which has a simple print with the new > compiler, but not the below one. > > Program: > ++++++++++ > #include <stdio.h> > #include <sys/resource.h> > > int main () { > > printf("TRAP_BRKPT is: %d\n", TRAP_BRKPT); > > return 0; > } > +++++++ > > ecomdev:/tmp # cc test.c > test.c: In function ‘main’: > test.c:6:31: error: ‘TRAP_BRKPT’ undeclared (first use in this function) > printf("TRAP_BRKPT is: %d\n", TRAP_BRKPT); > ^ > test.c:6:31: note: each undeclared identifier is reported only once for > each function it appears in > ecomdev:/tmp #
This is not a problem with GCC, it just means the TRAP_BRKPT symbol isn't defined in the headers you've included.