Gamemode SDK for C/C++ (GDK)

^ You need to include the sampgdk library.
Reply

Deleted - Moving on, thanks for module.
Reply

@Edit, fixed it, moving forward.
Reply

why when i press F7 to get the dll i get this error?:
PHP код:
1>SAMPlugin.obj error LNK2001unresolved external symbol __imp__sampgdk_SendClientMessageToAll 
It's happend to me again and again and i don't know why?
Please help me!
Reply

Quote:
Originally Posted by Dumbes
Посмотреть сообщение
why when i press F7 to get the dll i get this error?:
PHP код:
1>SAMPlugin.obj error LNK2001unresolved external symbol __imp__sampgdk_SendClientMessageToAll 
It's happend to me again and again and i don't know why?
Please help me!
You need to set up the library with the linker.

Mention which compiler you're using.
Reply

Quote:
Originally Posted by Deji
Посмотреть сообщение
You need to set up the library with the linker.

Mention which compiler you're using.
I setup all library what do you mean?
In kysro tutorial i see him using with gl_Invoke? how him do that
Reply

See this:

http://stackoverflow.com/questions/1...2008-c-project
Reply

Quote:
Originally Posted by xeeZ
Посмотреть сообщение
I'll try again,
and where all files? like:
PHP код:
#include <sampgdk/a_players-decl.h> 
when i try my first time complie it's give me error this hadar file isn't exist...
Reply

Did you download the zip file from this page? It has everything you need.
Reply

Quote:
Originally Posted by xeeZ
Посмотреть сообщение
Did you download the zip file from this page? It has everything you need.
Sorry for asking... but isn't 3.7 version outdated?
Reply

Quote:
Originally Posted by xeeZ
Посмотреть сообщение
Did you download the zip file from this page? It has everything you need.
I set the download you have been sent me and it's happend again..
This is the error right now:
PHP код:
1>SAMPlugin.obj error LNK2019unresolved external symbol __imp__sampgdk_SendClientMessageToAll referenced in function "bool __cdecl SendClientMessageToAll(int,char const *)" (?SendClientMessageToAll@@YA_NHPBD@Z
This is the code:
PHP код:
PLUGIN_EXPORT void PLUGIN_CALL Unload()
{
    
logprintf(" * Test plugin was unloaded.");
    
SendClientMessageToAll(-1,"Dan Test");

Reply

Quote:
Originally Posted by Kikito
Посмотреть сообщение
Sorry for asking... but isn't 3.7 version outdated?
Well, maybe it is but it's the latest "stable" version.

The one that I'm currently working on is not backward compatible with the previous versions and is still under heavy development (and thus may change a lot). It was called 4.0-pre at some point but then I changed the version number to 3.99 for some odd reason...
Reply

Quote:
Originally Posted by xeeZ
Посмотреть сообщение
Well, maybe it is but it's the latest "stable" version.

The one that I'm currently working on is not backward compatible with the previous versions and is still under heavy development (and thus may change a lot). It was called 4.0-pre at some point but then I changed the version number to 3.99 for some odd reason...
I want make some tests with this plugin
Are you have anyway to help me? skype, mIRC
Reply

You have to add sampgdk3.lib to Additional Dependencies in Project Properties -> Linker -> Input.
Reply

Quote:
Originally Posted by xeeZ
Посмотреть сообщение
You have to add sampgdk3.lib to Additional Dependencies in Project Properties -> Linker -> Input.
Work!!! Thanks!!!
Reply

Why when i start the server it's closed him and print me that:
PHP код:
v0.3z, (C)2005-2014 SA-MP Team

[18:34:30filterscripts ""  (string)
[
18:34:30
[
18:34:30Server Plugins
[18:34:30] --------------
[
18:34:30]  Loading pluginSAMPlugin.dll
[18:34:30]  * Test plugin was loaded.
[
18:34:30]   Loaded.
[
18:34:30]  Loading pluginsampgdk3.dll
[18:34:30]   Plugin does not conform to architecture.
[
18:34:30]   Failed.
[
18:34:30]  Loaded 1 plugins
Reply

... sampgdk3.dll -> plugins folder, kidding me right?
The sampgdk3 library should stay in the main sa-mp root folder.
Reply

Quote:
Originally Posted by Kikito
Посмотреть сообщение
... sampgdk3.dll -> plugins folder, kidding me right?
The sampgdk3 library should stay in the main sa-mp root folder.
I try this its not open me the server again...
Reply

You create a project in VS, and write "shit" in it.
Then press F6.
That will give you a dll, right?
That dll should be added inside the plugins folder.
The SAMPGDK3 dll should[and WILL] stay in the sa-mp server root folder.
In the server.cfg, you just add in the plugins lines the name of your dll, not the sampgdk3 dll.

Example:
Reply

Hi,

recently I downloaded sampgdk and have this warnings and 1 error:
Код:
C:\Users\Malganys\Desktop\C++\include\plugin.h	In file included from C:\Users\Malganys\Desktop\C++\include/plugin.h
22		C:\Users\Malganys\Desktop\C++\include\a_samp.h	                 from C:\Users\Malganys\Desktop\C++\include/a_samp.h
2		C:\Users\Malganys\Desktop\C++\Programa.cpp	                 from C:\Users\Malganys\Desktop\C++\Programa.cpp
185	47	C:\Users\Malganys\Desktop\C++\include\sdk\amx\amx.h	[Warning] 'packed' attribute ignored for field of type 'char [20]' [-Wattributes]
215	25	C:\Users\Malganys\Desktop\C++\include\sdk\amx\amx.h	[Note] in expansion of macro 'PACKED'
185	47	C:\Users\Malganys\Desktop\C++\include\sdk\amx\amx.h	[Warning] 'packed' attribute ignored for field of type 'char' [-Wattributes]
265	25	C:\Users\Malganys\Desktop\C++\include\sdk\amx\amx.h	[Note] in expansion of macro 'PACKED'
185	47	C:\Users\Malganys\Desktop\C++\include\sdk\amx\amx.h	[Warning] 'packed' attribute ignored for field of type 'char' [-Wattributes]
266	25	C:\Users\Malganys\Desktop\C++\include\sdk\amx\amx.h	[Note] in expansion of macro 'PACKED'
C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib32\libmingw32.a(lib32_libmingw32_a-crt0_c.o)	In function `main':
18		h:\crossdev\src\mingw-w64-v3-svn\mingw-w64-crt\crt\crt0_c.c	undefined reference to `WinMain@16'
C:\Users\Malganys\Desktop\C++\collect2.exe	[Error] ld returned 1 exit status
Warning lines:
Код:
#if defined __GNUC__
  #define PACKED        __attribute__((packed))
#else
  #define PACKED
#endif
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)