Raised This Month: $51 Target: $400
 12% 

Compiling Extensions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 07-07-2009 , 17:41   Compiling Extensions
Reply With Quote #1

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.
Wazz is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 07-07-2009 , 17:55   Re: Compiling Extensions
Reply With Quote #2

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.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 07-15-2009 , 17:50   Re: Compiling Extensions
Reply With Quote #3

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:
Code:
make ENGINE=orangebox -f $HOME/extension/Makefile
Annoyingly I keep recieving the following statement:
Code:
 
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.
Wazz is offline
TESLA-X4
Senior Member
Join Date: Dec 2008
Location: $Recycle.Bin
Old 07-21-2009 , 03:54   Re: Compiling Extensions
Reply With Quote #4

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):
Code:
make ENGINE=<engine>
after setting up the makefile's paths and it was all good

Hope this helps
TESLA-X4 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode