Links
Shared Object Information - Static And Dynamic
Dynamic Class Loading for C++ on Linux
Calling C++ Class Method From C
Server Setup
- Fedora Core
- chkconfig sshd on
- service sshd start
- chkconfig httpd on
- service httpd start
- yum install yum-plugin-fastestmirror
- yum install telnet
- yum install git
- yum install gcc
- yum install gcc-c++
- yum install glibc
- yum install mod_mono
- yum install monit
- <installation of boost instructions needed>
- Debian
- vi /etc/network/interfaces
- ifdown <interface>
- ifup <interface>
- apt-get install git
- apt-get install gcc
- apt-get install g++
- apt-get install monodevelop
- apt-get install mono-mcs
- apt-get install libboost.*-dev libboost-doc libboost.*1.42
Checking Out
git clone git@3ternal.com:3d.git
git clone git@3ternal.com:area.git
git clone git@3ternal.com:public.git
Compiling (*nix)
Game Engine
g++ -ldl -lboost_thread -rdynamic Driver.cpp Engine.cpp ModuleManager.cpp ThreadManager.cpp ThreadData.cpp Module.cpp Command.cpp Parameters.cpp Parameter.cpp Attributes.cpp Subscriptions.cpp -o 3ternalDivide
Modules
- Command Line Interface
- g++ -fPIC -shared CommandLineInterface.cpp -o libCLI.so
- Core
- g++ -w -fPIC -shared *.cpp chat/akey.c chat/allkeys.c chat/chatmain.c chat/eliza.c -o libCore.so
- Logger
- g++ -fPIC -shared Logger.cpp -o libLogger.so
- TCPManager
- g++ -fPIC -shared TCPManager.cpp Socket.cpp -o libTCPManager.so
- Unit Tests
- g++ -fPIC -shared UnitTests.cpp -o libUnitTests.so
Bridge Server
mcs -r:System.Data -r:System.Drawing -r:System.Windows.Forms ChatServer.cs Program-cli.cs -out:bridgeserver-cli.exe
Running
Game Engine:
./3ternalDivide <port> &
Bridge Server:
mono bridgeserver-cli.exe <bridge ip>:<bridge port> <engine ip>:<engine port> &
Fedora Note:
library files need special permissions, run the following command on fedora:
chcon -t textrel_shlib_t *.so
Debugging
Memory Leak Detection:
valgrind ./3ternalDivide
Thread Timing Issues:
valgrind --tool=helgrind ./3ternalDivide