Altera_Forum
Honored Contributor
20 years agoundefined reference to '__ctype_b'
hi,
Has any body ever encountered the problem of "undefined reference to __ctype_b" when linking with NIOS IDE before? I got the following error while linking using nios-elf g++ Note: the reason why it's reporting __ctype_b_loc instead of __ctype_b is because I went into Microtronix uCLinux include directory, and changed all ctype_b to ctype_b_loc in ctype.h as suggested by this: http://www.molpro.net/molpro-user/archive/all/msg01417.html (http://www.molpro.net/molpro-user/archive/all/msg01417.html) I also tried using a bigger libc.a as well (which was not in microtronix uCLibc directory), but it didnt help. Any help would be greatly appreciated! Thanks! ERROR MESSAGE: Unable to reach __ctype_b_loc (at 0x00000000) from the global pointer (at 0x000a95e0) because the offset (-693728) is out of the allowed range, -32678 to 32767.[Debug/libAutoClip.a(clp_obj.o)(.text+0xa4):../../../../C_RT/Source/clp_obj.c] undefined reference to `__ctype_b_loc'[../../../../C_RT/Source/clp_obj.c] *169: undefined reference to `__ctype_b_loc' ../../../../C_RT/Source/clp_obj.c:169: Unable to reach __ctype_b_loc (at 0x00000000) from the global pointer (at 0x000a95e0) because the offset (-693728) is out of the allowed range, -32678 to 32767. libAutoClip.a FROM CONSOLE: nios2-elf-g++ -nostdinc -D__linux__ -O0 -g -I"c:/altera/kits/nios2_51/bin/eclipse/plugins/com.microtronix.nios2linux.uClibc_1.4.0"/include -I/cygdrive/c/altera/kits/nios2_51/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/include -fno-optimize-sibling-calls -mhw-mul -mhw-mulx -I Connective_Logic_Systems/CLIP/BSP/Posix/Include -I Connective_Logic_Systems/CLIP/C_RT/Include -I Connective_Logic_Systems/CLIP/CPP_RT/Include -I Connective_Logic_Systems/CLIP/Operating_System/Posix/Include -I Connective_Logic_Systems/CLIP/Protocol/TCP_for_Posix/Include -I FFTW/fftw/Include -I PROSAS_Source/DataClasses/Include -I PROSAS_Source/Harnesses/Include -I PROSAS_Source/Infrastructure/Circuits/Include -I PROSAS_Source/Infrastructure/CxnPrototypes/Include -I PROSAS_Source/InputOutput/Devices/Include -I PROSAS_Source/Interfaces/Include/ -I PROSAS_Source/Processing/Include/ -I PROSAS_Source/ProjectHeaders/Include -I PROSAS_Source/Topics/ClpConfigDev -I PROSAS_Source/Topics/ClpList -D_DEBUG -c PROSAS_Source/InputOutput/Devices/Source/WatchDogDev.cpp -o Debug/WatchDogDev.o nios2-elf-g++ Debug/ProcAFEstData.o Debug/ProcAzFftData.o Debug/ProcAzIFftData.o Debug/ProcAzMocompData.o Debug/ProcData.o Debug/ProcInputData.o Debug/ProcOutputData.o Debug/ProcRgMocompData.o Debug/ProcRmaData.o Debug/ProcRpAdjData.o Debug/ProcTRData.o Debug/ProSASData.o Debug/ProcAFEstAdjCellMthd.o Debug/ProcAFEstAFLineMthd.o Debug/ProcAFEstCellProcessMthd.o Debug/ProcAFEstFFTMthd.o Debug/ProcAFEstIFFTMthd.o Debug/ProcAFEstPointMthd.o Debug/ProcAFEstRMAMthd.o Debug/ProcAFEstSetupMthd.o Debug/ProcAzFftAzFftMthd.o Debug/ProcAzFftCopyBackMthd.o Debug/ProcAzFftSetupMthd.o Debug/ProcAzIFftAzIFftMthd.o Debug/ProcAzIFftCopyBackMthd.o Debug/ProcAzIFftSetupMthd.o Debug/ProcAzMocompAzMocompMthd.o Debug/ProcAzMocompCopyBackMthd.o Debug/ProcAzMocompSetupMthd.o Debug/ProcInputFepRxThrd.o Debug/ProcInputReadThrd.o Debug/ProcOutputWriteThrd.o Debug/ProcRgMocompCopyBackMthd.o Debug/ProcRgMocompRgMocompMthd.o Debug/ProcRgMocompSetupMthd.o Debug/ProcRmaCopyBackMthd.o Debug/ProcRmaRmaMthd.o Debug/ProcRmaSetupMthd.o Debug/ProcRpAdjcopyBackMthd.o Debug/ProcRpAdjRpAdjMthd.o Debug/ProcRpAdjSetupMthd.o Debug/ProcTRTRMthd.o Debug/ProcAFEstCct.o Debug/ProcAzFftCct.o Debug/ProcAzIFftCct.o Debug/ProcAzMocompCct.o Debug/ProcCct.o Debug/ProcInputCct.o Debug/ProcOutputCct.o Debug/ProcRgMocompCct.o Debug/ProcRmaCct.o Debug/ProcRpAdjCct.o Debug/ProcTRCct.o Debug/ProcAFEstCpt.o Debug/ProcAzFftCpt.o Debug/ProcAzIFftCpt.o Debug/ProcAzMocompCpt.o Debug/ProcCpt.o Debug/ProcInputcpt.o Debug/ProcOutputCpt.o Debug/ProcRgMocompCpt.o Debug/ProcRmaCpt.o Debug/ProcRpAdjCpt.o Debug/ProcTRCpt.o Debug/BittwareAPI.o Debug/dspDev.o Debug/GenDspDev.o Debug/LedDev.o Debug/ProSAS.o Debug/WatchDogDev.o -o Debug/MISER_SCH.exe Debug/libAutoClip.a Debug/libClip_pp.a Debug/libClip_PP_Process.a Debug/libAutoClip.a(clp_obj.o)(.text+0xa4): In function `obj_init': ../../../../C_RT/Source/clp_obj.c:169: undefined reference to `__ctype_b_loc' Debug/libAutoClip.a(clp_obj.o)(.text+0xa4):../../../../C_RT/Source/clp_obj.c:169: Unable to reach __ctype_b_loc (at 0x00000000) from the global pointer (at 0x000a95e0) because the offset (-693728) is out of the allowed range, -32678 to 32767.