Linker error with flex - c

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

Related

Gtk3 - unresolved inclusion

I am using Ubuntu 18.04.4, and Eclipse 2019-12 (4.14.0) and I try to create a little C application with the help of Glade for the user interface.
Adding the following header files in C results in "unresolved inclusion" error:
#include <gtk/gtk.h>
#include <gtk/gtkx.h>
I have searched and tried in many ways to fix this, but unfortunately I didn't manage (I am new to linux/eclipse). The most easy solution seems to be a package called "Pkg-config" that knows itself how to add the gtk package, but unfortunately, this version of Eclipse does not support it.
The compiler sends the following error:
10:22:19 **** Incremental Build of configuration Debug for project MyTestProject ****
make all
Building file: ../src/MyTestProject.c
Invoking: GCC C Compiler
gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/MyTestProject.d" -MT"src/MyTestProject.o" -o "src/MyTestProject.o" "../src/MyTestProject.c"
../src/MyTestProject.c:17:10: fatal error: gtk/gtk.h: No such file or directory
#include <gtk/gtk.h>
^~~~~~~~~~~
compilation terminated.
src/subdir.mk:18: recipe for target 'src/MyTestProject.o' failed
make: *** [src/MyTestProject.o] Error 1
"make all" terminated with exit code 2. Build might be incomplete.
10:22:19 Build Failed. 3 errors, 0 warnings. (took 466ms)
Any ideas how I can solve this? I mention that libgtk-3-dev is installed on my system and it appears inside the "includes" folder.

WiiUse library and MAC El Capitan Undefined symbols

I'm trying to install WiiUse (https://github.com/rpavlik/wiiuse) on my El Capitan.
First I downloaded all the git, then I followed the instruction and when I try to run the example I get this error:
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How to solve this?

architecture x86_64 error in installing AVR development platform for mac

I tried to install AVR development platform for mac from this site
http://www.ladyada.net/learn/avr/setup-mac.html
Option 3. Old style, 'by hand' compilation
But I have an Error, Here is the error
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [cc1] Error 1
make[1]: *** [all-gcc] Error 2
make: *** [all] Error 2
is anyone can help me?
Looks like you're not setting your compiler to the avr-gcc you've (presumably) built. Set: CC=arv-gcc in your shell, or pass it to a configure script with:
env CC=avr-gcc ./configure ...
Just try another AVR that works in the other mac, I had this problem and it's working for me now.

Error to try compile with gcc

I'm trying to compile SNNS (Stuttgart Neural Network Simulator) is a software simulator for neural networks on Unix, but I got the following error message:
Ignore possible error messages for the following command:
ranlib libfunc.a
END OF COMMANDS THAT MAY FAIL
make[3]: Leaving directory `/home/fer/Desktop/SNNSv4.3/kernel/sources'
end of (re)making kernel libraries
gcc snns2c.o snns2clib.o ../../kernel/sources/libkernel.a ../../kernel/sources/libfunc.a -lm -ll -o snns2c
/usr/bin/ld: cannot find -ll
collect2: ld returned 1 exit status
But I don't know what I need to install, do you have an idea about this problem?
I think -ll is referring to the lex library libl, as per this message. You may need to modify that make file to link against flex.
I solved this problem after installing flex from the distro's official repository.

Building binutils with debugging mode

I'm trying to build binutils 2.21 source code with debugging on. My main aim is to debug objdump actually. But in order to build it I think I have to build whole package.
Unfortunately there is no debugging option on the configure file. I tried adding -g and -ggdb to CFLAGS before I configure it. However the error was:
Configuring in ./intl
configure: loading cache ./config.cache
configure: error: `CFLAGS' has changed since the previous run:
configure: former value: `-g -O2 -D__USE_MINGW_ACCESS'
configure: current value: `-g -D__USE_MINGW_ACCESS'
configure: error: in `/c/binutils-2.21/intl':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[1]: *** [configure-intl] Error 1
make[1]: Leaving directory `/c/binutils-2.21'
make: *** [all] Error 2
I tried "make clean" and "make distclean" but I'm receiving the same error. Actually according to former CFLAGS it had -g option on before but when I try to open objdump.exe in gdb it says
Reading symbols from c:\binutils-2.21\binutils/objdump.exe...
(no debugging symbols found)...done.
Thank you in advance.
Yes I've tried a lot. As I said -g tag was on to gcc. However makefile saves all debugging enabled binaries to binutils.libs\ directory. So when I run binutils.libs\objdump.exe under gdb it was fine. Thanks for your answer though.

Resources