Re: [pcre-dev] pcrecpp doesn't build with MSVC6

Page principale
Supprimer ce message
Auteur: Sheri
Date:  
À: pcre-dev@exim.org
Sujet: Re: [pcre-dev] pcrecpp doesn't build with MSVC6
On 10/10/2011 6:26 PM, Craig Silverstein wrote:
> } The other libraries build fine, but pcrecpp doesn't currently build
> } with MSVC6. It gets a link error:
> }
> } error LNK2001: unresolved external symbol __DllMainCRTStartup@12
> }
> } Anyone know how to fix this?
>
> I have no idea what this means, but isn't MSVC6 uber-old? I think
> it's probably ok to say that the c++ wrapper is only supported from
> MSVC 7 onwards.
>
> If you do want to fix it, a quick web search turned up:
>     http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesnative/thread/a7971494-7983-40f8-ae66-d4711acd0cbe

>
> The second comment has a possible solution. Does that work for you?
>
> Other threads talk about accidentally defining _ATL_MIN_CRT. Is that
> something that may have been happening in your configuration somehow?
> I don't know anything about ATL.
>
> craig
>
>


Configuring with CMake gives an option to configure for Visual Studio 6,
I don't find any _ATL defines in there.

Your web reference was not for this version but I was able to eliminate
the __DllMainCRTStartup@12 error by linking pcrecpp to LIBC.lib. After
that, building the test programs reported zero errors but did not create
any output exe files. Then I discovered that files with .cc extension
were not being recognized as C++ source! Once that was fixed, building
the library without linking to LIBC.lib no longer gave the unresolved
external symbol error for __DllMainCRTStartup@12. Instead it produced 75
errors (plus 2 warnings). About half are "ambiguous call to overload
function" for Arg::Arg.

I guess it would indeed be best to say the C++ wrapper is incompatible
with this version.

Regards,
Sheri