Skip to content
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

Seasocks using in my sw #136

Open
aledisi opened this issue Mar 16, 2020 · 2 comments
Open

Seasocks using in my sw #136

aledisi opened this issue Mar 16, 2020 · 2 comments
Labels
waiting Waiting on OP

Comments

@aledisi
Copy link

aledisi commented Mar 16, 2020

Hi,
I'm probably missing something stupid, but i'm trying to develope a software using seasocks for websocket.
I followed steps in tutorial to install the library and "build/src/app/c/ws_test" works correctly.
Now I started to copy the "ws_test.cpp" code to a file in other directory to test what to do to compile myown software using libsockets libs.

THIS IS MY MAKEFILE:


top_srcdir := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
top_builddir ?= $(CURDIR)
CC=g++ -std=c++11



SEASOCKS := ./seasocks

INCLUDES := -I $(SEASOCKS) -I $(SEASOCKS)/src/main/c/internal -I $(SEASOCKS)/src/main/c/seasocks \
	-I $(SEASOCKS)/src/main/c -I $(SEASOCKS)/build/src/main/c \
	-I /usr/local/include/

LIBS:= -lseasocks
	
LDFLAGS += -L$(SEASOCKS)/build/src/main/c

#LINKLIBS := $(SEASOCKS)/build/src/main/c/libseasocks.so.1.4.3
	
all: serverws

serverws: serverws.cpp
	$(CC) $(INCLUDES) serverws.cpp $(LIBS) $(LDFLAGS) -o serverws

clean:
	rm -rf *.o *.out

The "make" command compile without errors and create serverws executable, but when I try to execute I get: "error while loading shared libraries: libsockets.so.1.4.3 cannot open shared object file: No such file or directory".

I used the same kind of makefile for a lot of project without problems.
Someone can help me?
Alessandro

@offa
Copy link
Collaborator

offa commented Mar 16, 2020

Does it work with the static library?

@mattgodbolt
Copy link
Owner

@aledisi any further thoughts on this? Can you answer @offa 's question? thanks!

@mattgodbolt mattgodbolt added the waiting Waiting on OP label Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting Waiting on OP
Projects
None yet
Development

No branches or pull requests

3 participants