-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS - linking help with libssh? #23
Comments
I was able to build sshping for macOS 10.14 by installing Line 9 in 1456348
I didn't use |
For those who uses macports, install libssh and use this Makefile. Basically adding # See https://github.com/spook/sshping
.PHONY=default sshping man
CFLAGS=-I/opt/local/include -Iext -L/opt/local/lib -lssh
default: sshping
sshping: bin/sshping
bin/sshping: src/sshping.cxx
g++ -Wall -o bin/sshping $(CFLAGS) src/sshping.cxx
man: doc/sshping.8.gz
doc/sshping.8.gz: doc/sshping.8
gzip -9cn $< > $@
doc/sshping.8: doc/sshping.pod
if command -v pod2man &> /dev/null; then \
pod2man --section=8 -c "ssh-based ping test utility" -d 2018-03-13 -r v0.1.4 doc/sshping.pod doc/sshping.8; \
else \
echo '*** Please install pod2man so that we can create the man page'; \
exit 2; \
fi |
For Apple Silicon the paths are these ones instead: CFLAGS=-I /opt/homebrew/include -I ext -L /opt/homebrew/lib -lssh Remember to add |
I'm not too familiar with building C projects. This is what I ran to compile the project on an Apple SIlicon MBP brew install libssh
g++ -Wall -I /opt/homebrew/include -I ext -L /opt/homebrew/lib -o bin/sshping src/sshping.cxx -lssh |
Uses the compilation workaround from spook/sshping#23 (comment)
Hi - could someone help me with library linking? After installing libssh with
brew install libssh
, trying tomake
sshping throws the error that the file isn't found.I altered
sshping.cxx
to make sure#define LIBSSH_STATIC 1
was run even outside the ifdef / else statement (as some googling suggested) but that seems to have no effect on the error.Any help would be appreciated.
The text was updated successfully, but these errors were encountered: