13.08.2014, 03:15
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:
Result:
- Open pro file (sampplugin.pro)
Add anywhere
- Open def file (sampplugin.def)
Put this:
- 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.
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>
Code:
#if defined __WIN32__ || defined _WIN32 || defined WIN32 #include <windows.h> typedef __int64 int64_t; typedef unsigned __int64 uint64_t;
Add anywhere
Code:
DEF_FILE = sampplugin.def
Put this:
Code:
EXPORTS Supports Load Unload AmxLoad AmxUnload
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.