SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 14/05/2011, 10:23 PM   #1
N1trO
Little Clucker
 
Join Date: Dec 2008
Posts: 15
Reputation: 0
Default [Help] Compiling to linux

I have developped an INI file plugin for a while, and I'm having an hard time understanding how to compile my project to Linux.
I'm currently using Visual Studio 2010 IDE.

I know nobody really likes to answer the "How to compile to linux" question but it will be very helpful if you can help me quickly.
And I also know this isn't a "c help forum" but i posted it in "Stack Overflow" and non of their responds helped me.

thanks,
N1trO
N1trO is offline   Reply With Quote
Old 14/05/2011, 10:44 PM   #2
__
Huge Clucker
 
__'s Avatar
 
Join Date: Nov 2010
Location: o359t6lC0u4=
Posts: 232
Reputation: 20
Default Re: [Help] Compiling to linux

If your project produces a makefile, you can export the files to Linux and run "make" to compile your project with the g++ compiler, if I recall.
__ is offline   Reply With Quote
Old 15/05/2011, 08:32 AM   #3
N1trO
Little Clucker
 
Join Date: Dec 2008
Posts: 15
Reputation: 0
Default Re: [Help] Compiling to linux

Yes, i have a file called Makefile with no extension. So i need to install Linux and a g++ compiler.
But i dont really understand what to do when you said "run "make" to compile".

thank,
N1trO
N1trO is offline   Reply With Quote
Old 15/05/2011, 08:35 AM   #4
__
Huge Clucker
 
__'s Avatar
 
Join Date: Nov 2010
Location: o359t6lC0u4=
Posts: 232
Reputation: 20
Default Re: [Help] Compiling to linux

Install a Linux-based OS like CentOS on a virtual machine (or Ubuntu for a GUI) and move the files over, then open Terminal on the system and "cd" to the directory where the files are and type "make" as it will try to compile your project for Linux.
__ is offline   Reply With Quote
Old 15/05/2011, 08:59 AM   #5
N1trO
Little Clucker
 
Join Date: Dec 2008
Posts: 15
Reputation: 0
Default Re: [Help] Compiling to linux

Thanks!
I'll try it!

edit:
I need to modify the code if I'm only using "fstream" and other build-in libraries?
N1trO is offline   Reply With Quote
Old 16/05/2011, 01:55 PM   #6
N1trO
Little Clucker
 
Join Date: Dec 2008
Posts: 15
Reputation: 0
Default Re: [Help] Compiling to linux

Solved!
N1trO is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
General problems compiling on Linux (not asking for C help!) theRealG Plugin Development 2 11/04/2010 11:26 AM
Edit and Compiling... Linux Packer5 Server Support 2 20/12/2009 06:03 PM
Compiling on Linux Klid Help Archive 0 21/11/2009 12:11 PM
[LINUX] Compiling a .so XPlatform Plugin Development 3 16/01/2009 08:48 PM


All times are GMT. The time now is 09:12 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.