Fix civetweb header inclusion problem. #1188

This commit is contained in:
Penn, John M 047828115 2021-10-18 11:32:33 -05:00
parent 1179703b6d
commit 5b3770d15a
6 changed files with 11 additions and 12 deletions

View File

@ -6,7 +6,7 @@ PURPOSE: (Represent Websocket connection.)
#include <string>
#ifndef SWIG
#include "civet/CivetServer.h"
#include "CivetServer.h"
#endif
class WebSocketSession {

View File

@ -174,9 +174,9 @@ ifneq ($(GSL_HOME),)
endif
ifeq (${USE_CIVETWEB},1)
TRICK_LIBS += -ltrickCivet
TRICK_LIBS += -ltrickCivet
TRICK_EXEC_LINK_LIBS += -L${CIVETWEB_HOME}/lib -lcivetweb -lz
TRICK_SWIG_FLAGS += -DUSE_CIVETWEB
TRICK_SYSTEM_CXXFLAGS += -I$(CIVETWEB_HOME)/include
TRICK_SYSTEM_CXXFLAGS += -DUSE_CIVETWEB
TRICK_SYSTEM_ICG_EXCLUDE += ${CIVETWEB_HOME}
endif

View File

@ -4,11 +4,10 @@ exec(open("Modified_data/realtime.py").read())
# Start the Cannonball Graphics Client
#==========================================
web.server.enable = True
# web.server.debug = True
# web.server.port = 8888
# web.server.document_root = "www"
web.server.debug = True
web.server.port = 8888
web.server.document_root = "www"
trick.var_server_set_port(5001);
varServerPort = trick.var_server_get_port();
CannonDisplay_path = "../models/graphics/dist/CannonDisplay.jar"

View File

@ -22,4 +22,4 @@ class TimeSession : public WebSocketSession {
};
WebSocketSession* makeTimeSession( struct mg_connection *nc );
#endif
#endif

View File

@ -1,5 +1,5 @@
#include "civet/CivetServer.h"
#include "civet/civetweb.h"
#include "CivetServer.h"
#include "civetweb.h"
#include <string.h>
void handle_HTTP_GET_hello(struct mg_connection *nc, void *hm) {
@ -8,4 +8,4 @@ void handle_HTTP_GET_hello(struct mg_connection *nc, void *hm) {
"{ \"greeting\" : \"Hello Trick Sim Developer!\" }";
mg_send_chunk(nc, json_text, strlen(json_text));
mg_send_chunk(nc, "", 0);
}
}

View File

@ -10,7 +10,7 @@ LIBRARY DEPENDENCIES:
#include <vector>
#ifndef SWIG
#include "civet/CivetServer.h"
#include "CivetServer.h"
#endif
#include <iostream>