PDA

View Full Version : Compiling Extensions


Wazz
07-07-2009, 17:41
Just a quick question about compiling extensions.
Using microsoft VS c++ I have programmed an extension on windows for a windows server, I would like to know what people could recommend as an easy and smooth method for compiling the same project for a linux server.
Apologies if its a silly question, however my linux experience is next to nothing. If needed I have Ubuntu installed on a virtual PC however I would ideally like to stick to working in the windows environment.

DJ Tsunami
07-07-2009, 17:55
There's a Makefile the comes with the sample extension that you can edit and then use to compile under Linux. Under Windows you'd need cygwin I believe, but someone would have to tell you how to set it up.

Wazz
07-15-2009, 17:50
Thanks for the heads up Tsunami. After taking some time to play around with cygwin, I decided that it would be easier to just run Ubuntu from a VPC and compile it there. However I have run into a new problem.
Being completely spoilt with MSVC++ means that when it comes to the good ol' hardcore command line compiling I am completely useless. On Ubuntu I installed g++ and setup the envrionment variables in $HOME (eg $HOME/HL2SDK). The extension is also stored in $HOME/extension/ as well. I am trying to compile using this command: make ENGINE=orangebox -f $HOME/extension/MakefileAnnoyingly I keep recieving the following statement:

if [ "true" = "true" ] && [ "true" = "false" ]; then \
echo "You must supply ENGINE=orangebox or ENGINE=original"; \
exit 1; \
fi
mkdir -p Release.orangebox/sdk
mkdir -p Release.orangebox/CDetour
mkdir -p Release.orangebox/asm
if [ "true" = "true" ]; then \
ln -sf ~/srcds/orangebox/bin/vstdlib_i486.so vstdlib_i486.so; \
ln -sf ~/srcds/orangebox/bin/tier0_i486.so tier0_i486.so; \
fi
make -f Makefile extension
make[1]: Entering directory `/home/paul'
make[1]: Makefile: No such file or directory
make[1]: *** No rule to make target `Makefile'. Stop.
make[1]: Leaving directory `/home/paul'
make: *** [all] Error 2
What am I doing wrong? I am sure it's something simple.

TESLA-X4
07-21-2009, 03:54
You might want to open up the Makefile in a text editor and configure its paths.
Also, when I compiled in Linux, I just used the command (obviously you have to change <engine> to whatever suits your needs):
make ENGINE=<engine>
after setting up the makefile's paths and it was all good :D

Hope this helps