Reply To: GSL – GNU Scientific Library
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › GSL – GNU Scientific Library › Reply To: GSL – GNU Scientific Library
October 23, 2020 at 11:04 am
#5243
stephan
Moderator
PS: Further below in the GSL user guide (Section 2.2.1 Linking programs with the library), a basic gcc compiliation command is listed with additional compiler flags. You might want to include these flags in the specific Makefile in your OpenLB application. The section in the Makefile typically reads
###########################################################################
## link
link: $(OUTPUT)
$(OUTPUT): $(OBJECTS) $(ROOT)/$(LIBDIR)/lib$(LIB).a
@echo Link $@
$(CXX) $(foreach file, $(SRC), $(file:.cpp=.o)) $(LDFLAGS) -L$(ROOT)/$(LIBDIR) -l$(LIB) -lz -o $@
###########################################################################
The compiler flags you’d like to use should be added in the last line before $@
(e.g. ... -lgsl -lz -o $@
)