Skip to content

Reply To: GSL – GNU Scientific Library

#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 $@)

  • This reply was modified 3 years, 6 months ago by stephan.
  • This reply was modified 3 years, 6 months ago by stephan.
  • This reply was modified 3 years, 6 months ago by stephan.