они написали main.cpp, который настраивает websocketpp::server и Makefile для его компиляции. Makefile стандартный, только что взял его из обзора Google AI и не знаю, выглядит ли он фигней:
Код: Выделить всё
CXX = g++
CXXFLAGS = -std=c++17 -Wall -Wextra -O2
LDFLAGS = -lboost_system -lpthread
SRC = main.cpp
OBJ = $(SRC:.cpp=.o)
TARGET = websocket_shell
all: $(TARGET)
$(TARGET): $(OBJ)
$(CXX) $(OBJ) -o $(TARGET) $(LDFLAGS)
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
clean:
rm -f $(OBJ) $(TARGET)
Код: Выделить всё
main.cpp: In constructor ‘WebSocketShell::WebSocketShell()’:
main.cpp:12:9: error: ‘server’ was not declared in this scope
main.cpp:13:45: error: ‘bind’ was not declared in this scope
...
main.cpp: In member function ‘void WebSocketShell::on_message(...)’:
main.cpp:25:9: error: ‘send_packet’ was not declared in this scope
Код
Код: Выделить всё
You are an idiot!
make: *** [websocket_shell] Error 1
Мобильная версия