rentitem2 plugins

MAKE mt19937ar
make[1]: Entering directory `/.../.../Hercules/3rdparty/mt19937ar'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/.../.../Hercules/3rdparty/mt19937ar'
MAKE libconfig
make[1]: Entering directory `/.../.../Hercules/3rdparty/libconfig'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/.../.../Hercules/3rdparty/libconfig'
MAKE common_sql
make[1]: Entering directory `/.../.../Hercules/src/common'
make[1]: Nothing to be done for `sql'.
make[1]: Leaving directory `/.../.../Hercules/src/common'
CONFIGURE
Reconfiguring with options:
config.status: creating Makefile
config.status: creating src/common/Makefile
config.status: creating 3rdparty/mt19937ar/Makefile
config.status: creating 3rdparty/libconfig/Makefile
config.status: creating src/char/Makefile
config.status: creating src/login/Makefile
config.status: creating src/map/Makefile
config.status: creating src/plugins/Makefile
config.status: creating src/tool/Makefile
config.status: creating src/test/Makefile
config.status: creating tools/HPMHookGen/Makefile
config.status: creating tools/doxygen/Makefile
MAKE plugins
make[1]: Entering directory `/.../.../Hercules/src/plugins'
PLUGIN sample
PLUGIN db2sql
PLUGIN HPMHooking_char
PLUGIN HPMHooking_login
PLUGIN HPMHooking_map
CC rentitem2.c
rentitem2.c: In function 'plugin_init':
rentitem2.c:193: warning: implicit declaration of function 'GET_SYMBOL'
rentitem2.c:193: warning: nested extern declaration of 'GET_SYMBOL'
rentitem2.c:193: warning: assignment makes pointer from integer without a cast
rentitem2.c:194: warning: assignment makes pointer from integer without a cast
rentitem2.c:195: warning: assignment makes pointer from integer without a cast
rentitem2.c:196: warning: assignment makes pointer from integer without a cast
rentitem2.c:197: warning: assignment makes pointer from integer without a cast
/tmp/ccP0MSOU.o: In function `plugin_init':
/.../.../Hercules/src/plugins/rentitem2.c:193: undefined reference to `GET_SYMBOL'
/.../.../Hercules/src/plugins/rentitem2.c:193: undefined reference to `script'
/.../.../Hercules/src/plugins/rentitem2.c:194: undefined reference to `GET_SYMBOL'
/.../.../Hercules/src/plugins/rentitem2.c:194: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:195: undefined reference to `GET_SYMBOL'
/.../.../Hercules/src/plugins/rentitem2.c:195: undefined reference to `pet'
/.../.../Hercules/src/plugins/rentitem2.c:196: undefined reference to `GET_SYMBOL'
/.../.../Hercules/src/plugins/rentitem2.c:196: undefined reference to `itemdb'
/.../.../Hercules/src/plugins/rentitem2.c:197: undefined reference to `GET_SYMBOL'
/.../.../Hercules/src/plugins/rentitem2.c:197: undefined reference to `pc'
/.../.../Hercules/src/plugins/rentitem2.c:206: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:205: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:201: undefined reference to `showmsg'
/tmp/ccP0MSOU.o: In function `buildin_rentitem2':
/.../.../Hercules/src/plugins/rentitem2.c:129: undefined reference to `script'
/.../.../Hercules/src/plugins/rentitem2.c:156: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:148: undefined reference to `itemdb'
/.../.../Hercules/src/plugins/rentitem2.c:180: undefined reference to `pc'
/.../.../Hercules/src/plugins/rentitem2.c:182: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:137: undefined reference to `itemdb'
/.../.../Hercules/src/plugins/rentitem2.c:150: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:140: undefined reference to `showmsg'
/tmp/ccP0MSOU.o: In function `buildin_getequipexpiretick':
/.../.../Hercules/src/plugins/rentitem2.c:93: undefined reference to `script'
/.../.../Hercules/src/plugins/rentitem2.c:105: undefined reference to `pc'
/tmp/ccP0MSOU.o: In function `atcommand_rentitem':
/.../.../Hercules/src/plugins/rentitem2.c:45: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:52: undefined reference to `itemdb'
/.../.../Hercules/src/plugins/rentitem2.c:72: undefined reference to `pet'
/.../.../Hercules/src/plugins/rentitem2.c:85: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:80: undefined reference to `pc'
/.../.../Hercules/src/plugins/rentitem2.c:81: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:63: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:67: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:55: undefined reference to `clif'
collect2: ld returned 1 exit status
make[1]: *** [../../plugins/rentitem2.so] Error 1
make[1]: Leaving directory `/.../.../Hercules/src/plugins'
make: *** [plugins] Error 2

Sorry I'm not really used on debugging c

 
Last edited by a moderator:
try removing this

/* map-server interfaces */
script = GET_SYMBOL("script");
clif = GET_SYMBOL("clif");
pet = GET_SYMBOL("pet");
itemdb = GET_SYMBOL("itemdb");
pc = GET_SYMBOL("pc");

from 

Code:
HPExport void plugin_init (void) {
 
CC rentitem2.c
/tmp/ccn7ox2q.o: In function `plugin_init':
/.../.../Hercules/src/plugins/rentitem2.c:206: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:205: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:201: undefined reference to `showmsg'
/tmp/ccn7ox2q.o: In function `buildin_rentitem2':
/.../.../Hercules/src/plugins/rentitem2.c:129: undefined reference to `script'
/.../.../Hercules/src/plugins/rentitem2.c:156: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:148: undefined reference to `itemdb'
/.../.../Hercules/src/plugins/rentitem2.c:180: undefined reference to `pc'
/.../.../Hercules/src/plugins/rentitem2.c:182: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:137: undefined reference to `itemdb'
/.../.../Hercules/src/plugins/rentitem2.c:150: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:140: undefined reference to `showmsg'
/tmp/ccn7ox2q.o: In function `buildin_getequipexpiretick':
/.../.../Hercules/src/plugins/rentitem2.c:93: undefined reference to `script'
/.../.../Hercules/src/plugins/rentitem2.c:105: undefined reference to `pc'
/tmp/ccn7ox2q.o: In function `atcommand_rentitem':
/.../.../Hercules/src/plugins/rentitem2.c:45: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:52: undefined reference to `itemdb'
/.../.../Hercules/src/plugins/rentitem2.c:72: undefined reference to `pet'
/.../.../Hercules/src/plugins/rentitem2.c:85: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:80: undefined reference to `pc'
/.../.../Hercules/src/plugins/rentitem2.c:81: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:63: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:67: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:55: undefined reference to `clif'
collect2: ld returned 1 exit status
make[1]: *** [../../plugins/rentitem2.so] Error 1
make[1]: Leaving directory `/.../.../Hercules/src/plugins'
make: *** [plugins] Error 2




@Habilis

 
Last edited by a moderator:
...

replace top with

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include "common/hercules.h" /* Should always be the first Hercules file included! (if you don't make it first, you won't be able to use interfaces) */

#include "common/HPMi.h"
#include "common/timer.h"
#include "map/script.h"
#include "map/status.h"
#include "map/pc.h"
#include "map/clif.h"
#include "map/pet.h"
#include "map/script.h"
#include "map/itemdb.h"

#include "plugins/HPMHooking.h"
#include "common/HPMDataCheck.h" /* should always be the last Hercules file included! (if you don't make it last, it'll intentionally break compile time) */






Im not sure, but I think you can remove 

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

too

 
...

replace top with

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include "common/hercules.h" /* Should always be the first Hercules file included! (if you don't make it first, you won't be able to use interfaces) */

#include "common/HPMi.h"
#include "common/timer.h"
#include "map/script.h"
#include "map/status.h"
#include "map/pc.h"
#include "map/clif.h"
#include "map/pet.h"
#include "map/script.h"
#include "map/itemdb.h"

#include "plugins/HPMHooking.h"
#include "common/HPMDataCheck.h" /* should always be the last Hercules file included! (if you don't make it last, it'll intentionally break compile time) */






Im not sure, but I think you can remove 

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

too
Well errors are gone, and the ".so" file was successfully created. However, console says

[Error]: script error in file 'npc/custom/.../cro-newbie.txt' line 17column 5
parse_line: expect command, missing function name or calling undeclared function
15: mes "[The Newbie]";
16:
* 17: rentitem2(25511,1,1,1);
~~~~^




YAY! Got it, forgot to enable rentitem2 in conf/plugins.conf ... silly me ^__^ everything's working now

 
Last edited by a moderator:
CC rentitem2.c
/tmp/ccn7ox2q.o: In function `plugin_init':
/.../.../Hercules/src/plugins/rentitem2.c:206: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:205: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:201: undefined reference to `showmsg'
/tmp/ccn7ox2q.o: In function `buildin_rentitem2':
/.../.../Hercules/src/plugins/rentitem2.c:129: undefined reference to `script'
/.../.../Hercules/src/plugins/rentitem2.c:156: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:148: undefined reference to `itemdb'
/.../.../Hercules/src/plugins/rentitem2.c:180: undefined reference to `pc'
/.../.../Hercules/src/plugins/rentitem2.c:182: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:137: undefined reference to `itemdb'
/.../.../Hercules/src/plugins/rentitem2.c:150: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:140: undefined reference to `showmsg'
/tmp/ccn7ox2q.o: In function `buildin_getequipexpiretick':
/.../.../Hercules/src/plugins/rentitem2.c:93: undefined reference to `script'
/.../.../Hercules/src/plugins/rentitem2.c:105: undefined reference to `pc'
/tmp/ccn7ox2q.o: In function `atcommand_rentitem':
/.../.../Hercules/src/plugins/rentitem2.c:45: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:52: undefined reference to `itemdb'
/.../.../Hercules/src/plugins/rentitem2.c:72: undefined reference to `pet'
/.../.../Hercules/src/plugins/rentitem2.c:85: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:80: undefined reference to `pc'
/.../.../Hercules/src/plugins/rentitem2.c:81: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:63: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:67: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:55: undefined reference to `clif'
collect2: ld returned 1 exit status
make[1]: *** [../../plugins/rentitem2.so] Error 1
make[1]: Leaving directory `/.../.../Hercules/src/plugins'
make: *** [plugins] Error 2




@Habilis
Hello did you make it work in linux?

 
CC rentitem2.c
/tmp/ccn7ox2q.o: In function `plugin_init':
/.../.../Hercules/src/plugins/rentitem2.c:206: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:205: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:201: undefined reference to `showmsg'
/tmp/ccn7ox2q.o: In function `buildin_rentitem2':
/.../.../Hercules/src/plugins/rentitem2.c:129: undefined reference to `script'
/.../.../Hercules/src/plugins/rentitem2.c:156: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:148: undefined reference to `itemdb'
/.../.../Hercules/src/plugins/rentitem2.c:180: undefined reference to `pc'
/.../.../Hercules/src/plugins/rentitem2.c:182: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:137: undefined reference to `itemdb'
/.../.../Hercules/src/plugins/rentitem2.c:150: undefined reference to `showmsg'
/.../.../Hercules/src/plugins/rentitem2.c:140: undefined reference to `showmsg'
/tmp/ccn7ox2q.o: In function `buildin_getequipexpiretick':
/.../.../Hercules/src/plugins/rentitem2.c:93: undefined reference to `script'
/.../.../Hercules/src/plugins/rentitem2.c:105: undefined reference to `pc'
/tmp/ccn7ox2q.o: In function `atcommand_rentitem':
/.../.../Hercules/src/plugins/rentitem2.c:45: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:52: undefined reference to `itemdb'
/.../.../Hercules/src/plugins/rentitem2.c:72: undefined reference to `pet'
/.../.../Hercules/src/plugins/rentitem2.c:85: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:80: undefined reference to `pc'
/.../.../Hercules/src/plugins/rentitem2.c:81: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:63: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:67: undefined reference to `clif'
/.../.../Hercules/src/plugins/rentitem2.c:55: undefined reference to `clif'
collect2: ld returned 1 exit status
make[1]: *** [../../plugins/rentitem2.so] Error 1
make[1]: Leaving directory `/.../.../Hercules/src/plugins'
make: *** [plugins] Error 2




@Habilis
Hello did you make it work in linux?
Yes I did

 
Back
Top