04.07.2011, 08:34
Hey guys,
I have a few problems with my first plugin ;(
"plugin.cpp"
And those Errors:
I noticed all of them are in the "amx.h" - file, thats includet in the "plugin.cpp", but how to fix them ?
Tion
I have a few problems with my first plugin ;(
"plugin.cpp"
Code:
#include "SDK/plugin.h" typedef void (*logprintf_t)(char* format, ...) ; logprintf_t logprintf ; void **ppPluginData ; extern void *pAMXFunctions ; PLUGIN_EXPORT bool PLUGIN_CALL Load(void **ppData) { pAMXFunctions = ppData[PLUGIN_DATA_AMX_EXPORTS]; logprintf = (logprintf_t)ppData[PLUGIN_DATA_LOGPRINTF]; return 1; } PLUGIN_EXPORT void PLUGIN_CALL Unload() { } AMX_NATIVE_INFO projectNatives[] = { { 0, 0 } }; PLUGIN_EXPORT unsigned int PLUGIN_CALL Supports() { return SUPPORTS_VERSION | SUPPORTS_AMX_NATIVES; } PLUGIN_EXPORT int PLUGIN_CALL AmxLoad(AMX *amx) { return amx_Register(amx, projectNatives, -1); } PLUGIN_EXPORT int PLUGIN_CALL AmxUnload(AMX *amx) { return AMX_ERR_NONE; }
Code:
Compiler: Default compiler Building Makefile: "F:\samp\plugin\Makefile.win" Fьhrt make... aus make.exe -f "F:\samp\plugin\Makefile.win" all g++.exe -c plugin.cpp -o plugin.o -I"C:/CPP/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/CPP/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/CPP/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/CPP/Dev-Cpp/include/c++/3.4.2" -I"C:/CPP/Dev-Cpp/include" -DBUILDING_DLL=1 In file included from SDK/plugin.h:9, from plugin.cpp:1: SDK/amx/amx.h:64: error: `__int64' does not name a type SDK/amx/amx.h:65: error: `__int64' does not name a type SDK/amx/amx.h:368: error: expected constructor, destructor, or type conversion before '*' token SDK/amx/amx.h:368: error: expected `,' or `;' before '*' token SDK/amx/amx.h:384: error: `size_t' has not been declared SDK/amx/amx.h:384: error: ISO C++ forbids declaration of `size' with no type SDK/amx/amx.h:404: error: `size_t' has not been declared SDK/amx/amx.h:404: error: ISO C++ forbids declaration of `size' with no type make.exe: *** [plugin.o] Error 1 Ausfьhrung beendet
Tion