Open
Description
Hi, I'm currently trying to run the console example on a Raspberry Pi CM4 (Raspbian 11). I initially tried to use a Makefile in examples/Console/ to compile main.cpp, but I eventually ran into the error output seen in issue #300 (or something very similar) and was unable to move forward.
For reference, here is the Makefile I was testing with:
# Makefile
# run this from the /examples/Console directory
CC = g++
# CFLAGS = -Wall -Werror -Wmissing-prototypes
OBJS = main.o sio_client.o sio_socket.o
PROG = sio_client
LOCALLIBDIR = /usr/local/lib
LDFLAGS = -L$(LOCALLIBDIR)
# LDLIBS = -lone -ltwo
INC1=-I ../../src/
INC2=-I ../../lib/websocketpp/
INC3=-I ../../lib/asio/asio/include/
INC= $(INC1) $(INC2) $(INC3)
INC4=-I ../../src/internal
# ../../lib/rapidjson/include
# /usr/include/boost
all: $(PROG)
# $(PROG): $(OBJS)
# $(CC) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS) $(LDLIBS)
$(PROG): $(OBJS)
$(CC) -lm $(INC) $(OBJS) -o $@
main.o: main.cpp sio_client.o
$(CC) -c main.cpp
sio_client.o: ../../src/sio_client.cpp
$(CC) -c $(INC) -o sio_client.o ../../src/sio_client.cpp
sio_socket.o: ../../src/sio_socket.cpp
$(CC) -c $(INC) -o sio_socket.o ../../src/sio_socket.cpp
sio_client_impl.o: ../../src/internal/sio_client_impl.cpp ../../src/internal/sio_client_impl.h
$(CC) -c $(INC) $(INC4) -o sio_client_impl.o ../../src/internal/sio_client_impl.cpp
.PHONY: clean
clean:
rm -f *~ *.o $(PROG) core a.out
I then tried to follow the instructions for using CMAKE to build everything, but no build folder is generated:
As a reminder, my main goal is to compile examples/Console/main.cpp
If anyone sees what I'm doing wrong or is otherwise able to point me in the right direction, that would be greatly appreciated!
Metadata
Metadata
Assignees
Labels
No labels