[Tutorial] Plugin on the Qt5
#1

Warning! I am Russian and my English very bad, therefore i use translate.******.com.
Warning 2! You should read the topic: Plugin development guide


Why Qt?
+ crossplatform development
+ convenient tools
But!
- this requires adjustment SDK
- i don't testing this on Linux
- i testing this only with mingw32 compiler

Step 0. Install Qt 5 (i use 5.2.1)
Qt Project Home
Download Qt library and Qt Creator (I use mingw32)

Step 1. Create new project
File -> New File or Project -> Libraries -> C++ Library


Step 2. Add SDK to project
- Copy SDK folder to Project folder
- Right click to project and choose Add Existing Files

- Add all SDK files

- Right click to project and choose Add New... -> General -> Text File
Add DEF file (sampplugin.def)


Step 3. Edit SDK and include in project
- Open SDK/amx/amx.h
After 66 line write this:
Code:
#include <windows.h>
Result:
Code:
      
#if defined __WIN32__ || defined _WIN32 || defined WIN32
        #include <windows.h>
        typedef __int64	          int64_t;
        typedef unsigned __int64  uint64_t;
- Open pro file (sampplugin.pro)
Add anywhere
Code:
DEF_FILE = sampplugin.def
- Open def file (sampplugin.def)
Put this:
Code:
EXPORTS
	Supports
	Load
	Unload
	AmxLoad
	AmxUnload
- Open header file (sampplugin.h)
Delete class Sampplugin
- Open cpp file (sampplugin.cpp)
Delete constructor (Sampplugin::Sampplugin())

Step 4. Write a plugin using Plugin development guide

Step 5. Plugin file will require additional dll: libgcc_s_dw2-1.dll, libstdc++-6.dll, libwinpthread-1.dll and all library modules that you used (eg Qt5Core.dll).
Put them in the server root folder
They are in bin folder compiler (eg E:\Qt\5.2.1\mingw48_32\bin)

Warning 3! All this needs to be tested!

P.S. Sorry for the use ****** Translate. Correct me if you see errors.
Reply


Messages In This Thread
Plugin on the Qt5 - by Locky - 13.08.2014, 03:15
AW: Plugin on the Qt5 - by 123marvin123 - 13.08.2014, 09:45
Re: Plugin on the Qt5 - by iFarbod - 13.08.2014, 09:53
Re: Plugin on the Qt5 - by Locky - 15.08.2014, 15:17
Re: Plugin on the Qt5 - by ikkentim - 15.08.2014, 17:42
AW: Plugin on the Qt5 - by 123marvin123 - 15.08.2014, 18:05
Re: Plugin on the Qt5 - by Logofero - 30.11.2014, 01:46
Re: Plugin on the Qt5 - by KingHual - 30.11.2014, 05:24
Re : Plugin on the Qt5 - by S4t3K - 30.11.2014, 08:56
Re: Re : Plugin on the Qt5 - by KingHual - 30.11.2014, 13:53
Re: Plugin on the Qt5 - by Khanz - 01.12.2014, 17:01

Forum Jump:


Users browsing this thread: 1 Guest(s)