mruffalo/posix_ipc

demos compilation error

Closed this issue · 2 comments

I got some error compiling the folder demo. I changed the make_all.sh to be the following:

#!/usr/bin/env bash

# Linker opts is blank for OS X, FreeBSD and OpenSolaris
#LINKER_OPTIONS=""

# Must link with realtime libs for Linux
LINKER_OPTIONS="-lrt -lpthread"

gcc -Wall -c -o md5.o md5.c
gcc -Wall -c -o utils.o utils.c
gcc -Wall  md5.o utils.o -o premise premise.c -L. $LINKER_OPTIONS
gcc -Wall  md5.o utils.o -o conclusion conclusion.c -L. $LINKER_OPTIONS

It's just a comment that might be useful for someone in the future. Since I'm not an expert, I don't know why I had to add the lpthread library, I just googled and it worked. Also I moved $LINKER_OPTIONS to the end, because it was not working otherwise.

Thanks for the report. This GitHub repository is an unofficial archive/mirror of posix_ipc versions that Philip Semanchuk publishes at http://semanchuk.com/philip/posix_ipc/, so you might consider contacting him about this.

Oopps, thanks! I'll try to contact him.