del *.o

del cgid.exe

del gateway.exe

del hello.dll

del person.dll

del cgid.dll

g++ -Wall -std=c++98 thread.cpp -c

g++ -Wall -std=c++98 tcp_stream.cpp -c

g++ -Wall -std=c++98 tcp_server.cpp -c

g++ -Wall -std=c++98 cgid.cpp -c 

gcc -Wall -std=c89 dl.c -c

g++ -mwindows -Wall -std=c++98 -o cgid.exe dl.o thread.o tcp_stream.o tcp_server.o cgid.o -lws2_32 -lmysql -lpthread

rem g++ -shared -Wall -std=c++98 -o cgid.dll dl.o thread.o tcp_stream.o tcp_server.o cgid.o -lws2_32 -lmysql -lpthread

g++ service.cpp -o service.exe -lws2_32 -lmysql -lpthread

g++ -Wall -std=c++98 hello.cpp -c

g++ -Wall -std=c++98 -shared -o hello.dll hello.o tcp_stream.o -lws2_32 -lmysql

g++ -Wall -std=c++98 person.cpp -c

g++ -Wall -std=c++98 -shared -o person.dll person.o tcp_stream.o -lws2_32 -lmysql

g++ -Wall -std=c++98 test_cgi.cpp -o gateway.exe tcp_stream.o -lws2_32 -lmysql

rem copy gateway.exe \Inetpub\scripts

copy gateway.exe "C:\Program Files\Apache Software Foundation\Apache2.2\cgi-bin"

g++ -Wall -std=c++98 kill_cgid.cpp -o kill_cgid.exe