brucexs wrote:
> If I grab pcre.h, pcrecpp.h, pcre_stringpiece.h, I can get an empty 
> plugin dll to include these and compile.
> 
> But then if I add
> extern "C"
> _declspec(dllexport) void FullMatch(...)
> {
> 
>     string s;
>     pcrecpp::RE re("(\\w+):(\\d+)");
>     re.FullMatch("ruby:1234", &s);
> }
> my compiler does not like the &s.  The message is:
> error C2664: 'FullMatch' : cannot convert parameter 2 from 'class 
> std::basic_string<char,struct std::char_traits<char>,class 
> std::allocator<char> > *' to 'const class pcrecpp::Arg &'

It compiles for me. I didn't try to make and use a DLL... instead I
simply turned it into a console app. It works seems to work: s contains
ruby and I can make it contain something else by changing the expression.

Are you sure pcrecpparg.h is also avaiblable for your compiler to find
and include as well (you didn't mention it)? It defines the Arg class
your compiler seems to have trouble with and my compiler won't even let
me include pcrecpp.h if I don't provide it as well.

> I also looked into trying to recompile the source for pcrecpp.dll and 
> make the .lib as part of this compile, but it failed for a lot of 

This isn't surprising.
I've seen a number of instructions and patches for compiling with MSVC
but they are probably limited to more current versions.

> We can try that it you think you can solve above problems.

I never tried building a C++ PP plugin so I don't know whether we should 
expect any issues with this extern "C" business or the other code that 
interfaces with PP but otherwise compiling and linking works.
I probably know even less C++ than you do so translating any MS 
idiosyncrasies you might write into code that gcc understands might be a 
problem however.

Reply via email to