jbro/ring_buffer

For anyone having compatiblity issues running this

Opened this issue · 1 comments

Hi,
I used your code and the makefile doesn't work. That's because of the concerns listed here: rpath-makefile and also that you need an extra switch.

Add/modify these lines to the Makefile:

# Add the c99 standard library switch for getting for loops with init variable to work
# See this: gcc-default-stdc
CFLAGS = -DSHM -Wall -fPIC -std=c99

# As explained in the SO link above, 'rpath' is not necessarily valid as a linker switch for gcc directly
LDFLAGS = "-Wl,-rpath,./,-L./,-lrbuf"

# within the "test" section, change the line to this:
$(CC) $(CFLAGS) $(LDFLAGS) -g -o $@_dynamic $< -I$(SRCDIR)/

The do:

make
make test

run the 2 tests and you should see not output (errors).

jbro commented

Hi @electronicsguy

if you make a pull request with your changes, then I don't mind integrating them.

Regards
Jesper