Issue information

Issue ID
#8404
Status
Invalid
Severity
None
Started
Angelmelody
Oct 17, 2014 7:34
Last Post
Ind
Jan 18, 2015 18:14
Confirmation
N/A

Angelmelody - Oct 17, 2014 7:34

[code=auto:0] 1> patcommand.c 1>d:\ps\hercules\my-herc-src\src\plugins\patcommand.c(1593): error C2065: 'libpcre' : undeclared identifier 1>d:\ps\hercules\my-herc-src\src\plugins\patcommand.c(1593): error C2223: left of '->exec' must point to struct/union 1>d:\ps\hercules\my-herc-src\src\plugins\patcommand.c(1635): error C2065: 'libpcre' : undeclared identifier 1>d:\ps\hercules\my-herc-src\src\plugins\patcommand.c(1635): error C2223: left of '->compile' must point to struct/union 1>d:\ps\hercules\my-herc-src\src\plugins\patcommand.c(1640): error C2065: 'libpcre' : undeclared identifier 1>d:\ps\hercules\my-herc-src\src\plugins\patcommand.c(1640): error C2223: left of '->study' must point to struct/union 1>d:\ps\hercules\my-herc-src\src\plugins\patcommand.c(1691): error C2065: 'libpcre' : undeclared identifier 1>d:\ps\hercules\my-herc-src\src\plugins\patcommand.c(1691): error C2223: left of '->free' must point to struct/union 1>d:\ps\hercules\my-herc-src\src\plugins\patcommand.c(1694): error C2065: 'libpcre' : undeclared identifier 1>d:\ps\hercules\my-herc-src\src\plugins\patcommand.c(1694): error C2223: left of '->free' must point to struct/union ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== [/code]
relative topic : [url="http://herc.ws/board/topic/4855-port-preg-match-from-rathena/"]http://herc.ws/board/topic/4855-port-preg-match-from-rathena/[/url]

This post has been edited by Angelmelody on Oct 18, 2014 2:02

Ind - Oct 17, 2014 17:48

Are you including npc.h? Also is your MSVC project defining PCRE_SUPPORT? (or linking to it, no idea how windows does it (you should check settings of map server, theres probably a PCRE_SUPPORT somewhere)

Ind - Oct 17, 2014 17:50

yes...I believe it is a problem with your plugin MSVC settings, you have to define pre include/lib, for example, map server does this (quote from [url="https://github.com/HerculesWS/Hercules/blob/master/vcproj-10/map-server.vcxproj"]https://github.com/HerculesWS/Hercules/blob/master/vcproj-10/map-server.vcxproj[/url] )[code=auto:0] <AdditionalIncludeDirectories>..\3rdparty\mysql\include;..\3rdparty\zlib\include;..\3rdparty\pcre\include;..\3rdparty\msinttypes\include;..\3rdparty\mt19937ar;..\3rdparty\libconfig;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;PCRE_SUPPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions)</PreprocessorDefinitions> [/code](note pcre)
also in[code=auto:0] <AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;pcre.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile> <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> [/code]

Angelmelody - Oct 18, 2014 2:18

yes,I had inclueded [url="http://pastebin.com/21wT1feR"]npc.h and pcre.h[/url] , Here is my [url="http://pastebin.com/Qwg4UXM2"]map-server.vcxproj [/url]

,but pcre_interface still not working with msvc compiling

This post has been edited by Angelmelody on Oct 18, 2014 2:24

Angelmelody - Dec 22, 2014 3:55

up ! Could someone take some time to fix it and make it works under mscv compiling?

Ind - Jan 18, 2015 16:30

Your map-server vcxproj isn't what I need to see, it is your plugins .vcxproj

Angelmelody - Jan 18, 2015 17:44

[quote name="Ind" timestamp="1421598605"]
Your map-server vcxproj isn't what I need to see, it is your plugins .vcxproj[/quote]

Here is my [url="http://pastebin.com/raw.php?i=KYpXBwNk"]plugin-atcommand.vcxproj[/url] , I have no idea where I should insert
pcre_suuport and pcre.lib into my plugin :(

Ind - Jan 18, 2015 18:14

yes that confirms it, your plugin project is not set to pcre (thus the error).
pretty much see where the map server vcxproj has pcre, and set it for your plugin as well