undefined reference to `__isoc99_sscanf'
Hello,
When I compile my code in Linux (ATCA machine), I am getting the following error: /vobs/ims_do/lib/rhlinux/debug/libnem-dummy_td2.so: undefined reference to `__isoc99_sscanf' The same code is being compiled in Solaris without any problems. Please help me find a solution. Regards, Harish |
Quote:
A likely cause is that standard "C" library is missing, but if that's the case, the question is "why ?". I.e. typically linker know that it's needed. Try to add '-lc' to your command line. |
Quote:
You'll need to check which static library file (*.a) refers to that symbol, and recompile it. You can use command Code:
objdump -t path-to-library.a | grep -e __isoc99_sscanf Alternatively, you can upgrade your c library to version 2.7 or newer. If you're using Debian or Ubuntu, upgrading package libc6-dev to at least 2.7 should be enough. If the error message referred to an unversioned symbol (i.e. the error message did not refer to __isoc99_sscanf@@GLIBC...), then you could write a __isoc99_sscanf wrapper using stdargs and GNU sscanf (their differences being usually insignificant) and include that in the linking. |
Quote:
Thanks! |
Hi guys
New one here.. I am also having the same problem installing Nagios Plugins.. ssl -lcrypto -lpthread -ldl libtool: link: gcc -DNP_VERSION=\"1.4.16\" -g -O2 -o check_http check_http.o sslutils.o netutils.o utils.o -L/root/downloads/nagios-plugins-1.4.16/plugins -L/usr/local/ssl/lib ../lib/libnagiosplug.a ../gl/libgnu.a -lnsl -lresolv -lssl -lcrypto -lpthread -ldl /usr/local/ssl/lib/libcrypto.a(v3_utl.o): In function `ipv6_cb': v3_utl.c:(.text+0x2d9): undefined reference to `__isoc99_sscanf' /usr/local/ssl/lib/libcrypto.a(v3_utl.o): In function `a2i_ipadd': v3_utl.c:(.text+0x125d): undefined reference to `__isoc99_sscanf' /usr/local/ssl/lib/libcrypto.a(v3_utl.o): In function `a2i_IPADDRESS': v3_utl.c:(.text+0x135f): undefined reference to `__isoc99_sscanf' /usr/local/ssl/lib/libcrypto.a(v3_utl.o): In function `a2i_IPADDRESS_NC': v3_utl.c:(.text+0x19df): undefined reference to `__isoc99_sscanf' v3_utl.c:(.text+0x1a77): undefined reference to `__isoc99_sscanf' collect2: ld returned 1 exit status make[1]: *** [check_http] Error 1 make[1]: Leaving directory `/root/downloads/nagios-plugins-1.4.16/plugins' make: *** [install-recursive] Error 1 Any ideas similar ideas?? |
undefined reference to `__isoc99_fscanf'
Use -D_GNU_SOURCE to compile. It will resolve the issue.
Thanks Madan |
All times are GMT -5. The time now is 10:10 PM. |