An error while building a project : arm-none-eabi/bin/ld: cannot find -lnsc - c

I am using eclipse for building a demo project. I tried different toolchain versions of arm-none-eabi but all of them give me the same error :
/usr/share/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: cannot find -lnsc
collect2: error: ld returned 1 exit status `
I followed this(first answer) to install arm-none-eabi on my Ubuntu:
https://askubuntu.com/questions/1243252/how-to-install-arm-none-eabi-gdb-on-ubuntu-20-04-lts-focal-fossa

Related

C language, cannot find -lglut32 [duplicate]

I run my project which uses:
#include <C:\Users\R\Desktop\LABO3\zad3\Debug\glut.h>
but then when I build it I get this error:
--------------------Configuration: zad3 - Release--------------------
Linking...
C:\Program Files (x86)\MinGWStudio\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lglut32
collect2: ld returned 1 exit status
zad3.exe - 1 error(s), 0 warning(s)
How to fix this? I got the dll in the projects directory.
I got the dll in the projects directory.
Then you need to provide -L. on the compilation command line.
Otherwise the DLL should be in some system directory that's on the PATH.
Compilers generally expect libraries to be system-installed and available from anywhere on that system, rather than in some specific project's directory.

undefined reference to symbol 'CERT_GetDefaultCertDB##NSS_3.2'

I recently added libcurl dependency to my c++ library. I statically compiled libcurl with-nss for https support. I use Debian 7 for compilation.
I create two builds for my library - static and shared
Shared version is linking fine with binaries built on any Linux distro, but the static build only links with binaries when compiled on Debian 7.
I tried static linking on Ubuntu 16.04, Debian Stretch but all are reporting following error during compilation:
g++ -Wall -o Sample Sample.cpp -Wl,-Bstatic -L. -lMyLibrary -Wl,-Bdynamic -lssl3
/usr/bin/ld: ./libMyLibrary.a(libcurl_la-nss.o): undefined reference to symbol 'CERT_GetDefaultCertDB##NSS_3.2'
//usr/lib/x86_64-linux-gnu/libnss3.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:22: recipe for target 'Sample' failed
make: *** [Sample] Error 1
Static compilation now only works on Debian 7 which is a big problem.
Static libraries are just archives of object files. As one consequences, they don't carry any dependency information. So, if you link a static library which depends on some other libraries, you have to add these explicitly in your linking command.
In your case, this means:
find whoever defines CERT_GetDefaultCertDB##NSS_3.2 -- some answers to this FAQ could help here
add this library to your linker command (with -l, after your static library)

Linker error with flex

I just finished compiling and installing flex for my macbook pro and tried to compile a file using flex. I get the following error:
ld: library not found for -lfl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [myhtml2txt] Error 1
I believe -lfl is the linker for flex, so why am I getting this error, and how can I fix it?
you are missing to add libflex or it could be libfl. your main error ld: library not found for -lfltells that library is missing. l in -lfl denotes the library. by adding library you will not see this error

C-Motif code project porting from unix to linux

I am porting C-Motif code project from unix to ubuntu linux system.
I'm able to solve various problems but still there are some problems while doing make.
/usr/bin/ld: cannot find -lXmu
/usr/bin/ld: cannot find -lnls
/usr/bin/ld: cannot find -lsocket
/usr/bin/ld: cannot find -ll
collect2: error: ld returned 1 exit status
make: *** [../bin/ipsge] Error 1
For -lXmu install:
sudo apt-get install libxmu-headers
sudo apt-get install libxmu-dev
Try compiling without -lnls / -lsocket
and see if the problem is fixed.
I don't know libl.a What flavor of UNIX are you porting from?

Gcc default version crashes

I working on open source GHDL project for my project purpose installed ghdl-0.29-2.143svn.4.fc16.src.rpm consisting of ghdl 0.29 and gcc 4.3.4 through rpm -i and rpmbuild -ba command successfully.
In ghdl folder, I edited one ada program then I did make and make install : no errors but it creates problem changes in gcc version 4.6.3 (default) to 4.3.4 and no gcc program execution gave error:
error: C compiler cannot create executables
See `config.log' for more details."
In config.log file /usr/bin/ld: cannot find crtbegin.o: No such file or directory
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
Thanks in advance
Regards
Raghu
Have you tried reinstalling glibc? That might work.

Resources