Skip to content

Reply To: GSL – GNU Scientific Library

Due to recent bot attacks we have changed the sign-up process. If you want to participate in our forum, first register on this website and then send a message via our contact form.

Forums OpenLB General Topics GSL – GNU Scientific Library 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 5 years, 2 months ago by stephan.
  • This reply was modified 5 years, 2 months ago by stephan.
  • This reply was modified 5 years, 2 months ago by stephan.