WebCLIPS Under Linux and FreeBSD
Red Hat Version: 7.3
gcc Version: 2.96
FreeBSD Version: 4.10-RELEASE-p5
gcc Version: 2.95.4
No other configurations have been tested
Integrate WebCLIPS with CLIPS
Warning: These notes assume that the reader is familiar with the contents of a Makefile
1) Create a new directory, 6.22_with_WebCLIPS
2) Extract the CLIPS 6.22 tar file into the new directory
3) Start with the CLIPS 6.22 makefile, copy to Makefile
4) Add the pertinent items from the WebCLIPS 2.0.3 makefile:
wccookie.o wccore.o wcmisc.o wcroute.o WebCLIPS.o webio.o
(The line shown above gets added to the end of the OBJS section.
Remember to add the continuation character "\" to the end of the previous line.)
WebCLIPS : $(OBJS)
gcc -o WebCLIPS.cgi $(OBJS) -lm -ltermcap
wccookie.o: wccookie.c setup.h WebCLIPS.h WCVars.h
wccore.o: wccore.c setup.h WebCLIPS.h WCVars.h
wcmisc.o: wcmisc.c setup.h WebCLIPS.h WCVars.h
wcroute.o: wcroute.c setup.h WebCLIPS.h WCVars.h
WebCLIPS.o: WebCLIPS.c setup.h WebCLIPS.h WCVars.h
webio.o: webio.c setup.h WebCLIPS.h WCVars.h
5) Remove the gcc command lines for CLIPS:
clips : $(OBJS)
gcc -o clips $(OBJS) -lm -ltermcap
6) Remove the reference to main.o in the OBJS section - it's replaced by the main declaration
in WebCLIPS.c
7) Copy all the WebCLIPS *.h and *.c files into the 6.22_with_WebCLIPS directory
8) Source file modifications:
WebCLIPS.h
Comment out the Reset declaration in the wccore.cpp section, as it does not exist in the code
wcmisc.c
The statement:
if(MaxLength >= strlen(p)) return(MaxLength); else return(strlen(p));
originally did not have a semicolon after the return statement, causing Linux RH7.3 gcc to fail
sysdep.c
Remove references to EnvUserFunctions.
The function is defined in main.c, which is not used when integrated with WebCLIPS.
9) Run make