[Help] Errors in SDK - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Plugin Development (
https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Help] Errors in SDK (
/showthread.php?tid=266272)
[Help] Errors in SDK -
Tion - 04.07.2011
Hey guys,
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;
}
And those Errors:
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
I noticed all of them are in the "amx.h" - file, thats includet in the "plugin.cpp", but how to fix them ?
Tion
Re: [Help] Errors in SDK -
RyDeR` - 04.07.2011
Just refollow my tutorial. You probably missed a part.
https://sampforum.blast.hk/showthread.php?tid=253436
AW: [Help] Errors in SDK -
Tion - 04.07.2011
Well, I have a different compiler so I have to change a few steps, but in the mainpoint I used your tutorial
I use the Bloodshed Dev-C++ compiler ( there is an textiditor inthere, too

)
Re: [Help] Errors in SDK - 0x5A656578 - 05.07.2011
I'm not familiar with Dev-C++ (btw it's not a compiler, it's an IDE) but I see you're compiling with MinGW (the port of gcc for Windows), this post should be helpful to you:
http://forum.sa-mp.com/showpost.php?...61&postcount=2
AW: [Help] Errors in SDK -
Tion - 08.07.2011
thanks ill try it tomorrow
Tion