SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 25/03/2012, 06:46 PM   #1
ShOoBy
Huge Clucker
 
ShOoBy's Avatar
 
Join Date: Mar 2011
Location: Europe
Posts: 205
Reputation: 50
Default Any tutorial about this?

Erm , hello
I was wonering if it is a tutorial on this forum , about creating a plugin in MinGw. I use MinGw because the compiling time is much much much faster than C++ or C#. But it's a little bit strange , for example I cant find the option for creating a .dll file ...
So can anyone give me a tutorial with this?


Sorry for my bad english and/or if I posted in the wrong section
__________________
ShOoBy is offline   Reply With Quote
Old 26/03/2012, 10:17 AM   #2
T0pAz
Guest
 
Posts: n/a
Default Re: Any tutorial about this?

DLL is also known as Class Library or Dynamic Link Library which cannot be executed. Maybe creating a blank project then setting the output type to DLL.
  Reply With Quote
Old 28/03/2012, 03:11 AM   #3
russo666
High-roller
 
Join Date: Sep 2007
Posts: 1,050
Reputation: 5
Default Re: Any tutorial about this?

I'm not sure if I correctly understood your question, but here is goes:

Code:
Example: 
For the file helloworld.cpp in the folder C:\docs\hello enter the command

         cd c:\docs\hello

Now type the compile command

         g++ helloworld.cpp -o helloworld.exe

The -o switch defines the name of the output file, without it the output file would be a.exe.
Remember to change the extension.

Source: http://www.mingw.org/wiki/MinGWforFirstTimeUsers
russo666 is offline   Reply With Quote
Old 01/04/2012, 04:02 PM   #4
ShOoBy
Huge Clucker
 
ShOoBy's Avatar
 
Join Date: Mar 2011
Location: Europe
Posts: 205
Reputation: 50
Default Re: Any tutorial about this?

Never mind , I found the answer:

Code:
Building the DLL
To build the DLL use the following commands:

g++ -c -DBUILDING_EXAMPLE_DLL example_dll.cpp
g++ -shared -o example_dll.dll example_dll.o -Wl,--out-implib,libexample_dll.a

The -DBUILDING_EXAMPLE_DLL compiler option causes the DLL's functions to be declared as "dllexport", meaning that they will be "exported" from the DLL and available to client applications. The "-shared" option tells the linker to create a DLL instead of an .exe, and the "--out-implib" linker option causes an import library to be created, which is used later on.

Note:

The import library created by the "--out-implib" linker option is required iff (==if and only if) the DLL shall be interfaced from some C/C++ compiler other than the MinGW toolchain. The MinGW toolchain is perfectly happy to directly link against the created DLL. More details can be found in the ld.exe info files that are part of the binutils package (which is a part of the toolchain).
But I dont use MinGw anymore .. it's just to different from other Programs.
__________________
ShOoBy is offline   Reply With Quote
Old 14/04/2012, 04:50 PM   #5
bashar0151
Big Clucker
 
Join Date: Aug 2009
Location: Liverpool uk
Posts: 110
Reputation: 9
Default Re: Any tutorial about this?

on youtube maby
bashar0151 is offline   Reply With Quote
Old 30/06/2012, 01:02 AM   #6
KarlMann
Little Clucker
 
Join Date: Jun 2012
Location: http://www.easydvdmart.com/
Posts: 1
Reputation: 0
Default Re: Any tutorial about this?

I'm not sure whether I understand your problem......
__________________
recommend you 90210 season 4 dvd,a very good-looking DVD!
KarlMann 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
[Tutorial] Tutorial basico para los mas nuevos TheChaoz Lanzamientos/Releases 29 01/02/2014 02:45 PM
[Tutorial] Kako napraviti tutorial sa TextDraw-ovima Gagi_Corleone Archive 15 30/09/2011 11:56 AM
[tutorial] How to change your Peds Texture (My first tutorial) toXioneer Screenshots and Videos 3 03/12/2010 11:13 PM
[GF-Tutorial] & [NON-GF-Tutorial] : Fahrschule Mit Fragen Erstellen V.2.0 [Erfor playafaller Archive 1 26/12/2009 03:24 PM


All times are GMT. The time now is 08:45 PM.


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