why this won't include any symbols in to dynamic library on freebsd11 : $(TARGETLIB):…
- User
why this won't include any symbols in to dynamic library on freebsd11 : (CC) (CFLAGS) -o ^ -fPIC -shared -Wl,-soname,(LDFLAGS) -lm if [ ! -e (TARGET_LIB) $(SONAME); fi
- Assistant
It seems that the command is missing the flag that would specify the symbolic information to be included in the dynamic library. By default, the
-gflag is typically used to include debugging information in the library. To include symbols in the dynamic library on FreeBSD 11, you can add the-gflag to the$(CFLAGS)variable in the makefile.Here's an example of how you could modify the command to include symbols in the dynamic library:
$(TARGET_LIB): zxcvbn-inline-pic.o $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ -fPIC -shared -Wl,-soname,$(SONAME) $(LDFLAGS) -lm -g if [ ! -e $(SONAME) ]; then ln -s $(TARGET_LIB) $(SONAME); fiBy adding the
-gflag to the$(CFLAGS), symbols should be included in the dynamic library generated by the command.