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> #include <string>
#ifndef SWIG #ifndef SWIG
#include "civet/CivetServer.h" #include "CivetServer.h"
#endif #endif
class WebSocketSession { class WebSocketSession {

View File

@ -174,9 +174,9 @@ ifneq ($(GSL_HOME),)
endif endif
ifeq (${USE_CIVETWEB},1) ifeq (${USE_CIVETWEB},1)
TRICK_LIBS += -ltrickCivet TRICK_LIBS += -ltrickCivet
TRICK_EXEC_LINK_LIBS += -L${CIVETWEB_HOME}/lib -lcivetweb -lz 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_CXXFLAGS += -DUSE_CIVETWEB
TRICK_SYSTEM_ICG_EXCLUDE += ${CIVETWEB_HOME} TRICK_SYSTEM_ICG_EXCLUDE += ${CIVETWEB_HOME}
endif endif

View File

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

View File

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

View File

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

View File

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