pthreadVC2.dll dependency on MSVCR100.dll

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

pthreadVC2.dll dependency on MSVCR100.dll

Bruce Cran
I noticed that between 2.8.0 and 2.9.1 a dependency on the Visual C++
2010 runtime has been added to the prebuilt DLLs: instead of linking
against MSVCRT.dll it now links against MSVCR100.dll.  Was that
deliberate, or just because of the way they were built for release?

--
Bruce Cran
Reply | Threaded
Open this post in threaded view
|

Re: pthreadVC2.dll dependency on MSVCR100.dll

Ross Johnson-2
Not deliberate. I assume this is a default and one reference I found
claims it is linked to by msvcrt.lib in VS 2010. I'm looking but I
haven't found a solution yet that I like (assuming it's correct the same
reference suggests either linking statically or building with an old
environment - both unacceptable ).

Suggestions welcome.

On 24/11/2012 7:23 AM, Bruce Cran wrote:
> I noticed that between 2.8.0 and 2.9.1 a dependency on the Visual C++
> 2010 runtime has been added to the prebuilt DLLs: instead of linking
> against MSVCRT.dll it now links against MSVCR100.dll.  Was that
> deliberate, or just because of the way they were built for release?
>

Reply | Threaded
Open this post in threaded view
|

Re: pthreadVC2.dll dependency on MSVCR100.dll

Bruce Cran
On 25/11/2012 23:09, Ross Johnson wrote:
> Not deliberate. I assume this is a default and one reference I found
> claims it is linked to by msvcrt.lib in VS 2010. I'm looking but I
> haven't found a solution yet that I like (assuming it's correct the
> same reference suggests either linking statically or building with an
> old environment - both unacceptable ).

If both those are unacceptable then the only solution will be to
document the dependency. The last toolset which allowed linking to
msvcrt.dll was WDK 7.1, and that has now been superseded by WDK 8.0,
which uses VS 2012 instead of an ancient set of compilers.  I confirmed
with Doron at Microsoft earlier this year that it's now a requirement to
link against VS's CRT (http://www.osronline.com/showthread.cfm?link=221792).

Why is statically linking the CRT unacceptable?

--
Bruce Cran
Reply | Threaded
Open this post in threaded view
|

Re: pthreadVC2.dll dependency on MSVCR100.dll

Ross Johnson-2
On 26/11/2012 11:02 AM, Bruce Cran wrote:

> On 25/11/2012 23:09, Ross Johnson wrote:
>> Not deliberate. I assume this is a default and one reference I found
>> claims it is linked to by msvcrt.lib in VS 2010. I'm looking but I
>> haven't found a solution yet that I like (assuming it's correct the
>> same reference suggests either linking statically or building with an
>> old environment - both unacceptable ).
>
> If both those are unacceptable then the only solution will be to
> document the dependency. The last toolset which allowed linking to
> msvcrt.dll was WDK 7.1, and that has now been superseded by WDK 8.0,
> which uses VS 2012 instead of an ancient set of compilers.  I
> confirmed with Doron at Microsoft earlier this year that it's now a
> requirement to link against VS's CRT
> (http://www.osronline.com/showthread.cfm?link=221792).
>
> Why is statically linking the CRT unacceptable?
>

At the moment this only affects "errno" AFAIK.

The next release will allow a #define PTW32_USES_SEPARATE_CRT switch to
support static linking the CRT into the library but requires application
code changes to replace use of "errno" in some cases. But the prebuilt
dlls won't be compiled with that switch.

Reply | Threaded
Open this post in threaded view
|

Re: pthreadVC2.dll dependency on MSVCR100.dll

Bruce Cran
On 26/11/2012 01:30, Ross Johnson wrote:
> At the moment this only affects "errno" AFAIK.
>
> The next release will allow a #define PTW32_USES_SEPARATE_CRT switch
> to support static linking the CRT into the library but requires
> application code changes to replace use of "errno" in some cases. But
> the prebuilt dlls won't be compiled with that switch.
>

Thanks, that makes sense - I found the explanation in pthread.h too.
Are you planning to add a VS 2010 project file to CVS? It would be
useful to have one since Visual Studio won't upgrade from the .dsp/.dsw
files.

--
Bruce Cran
Reply | Threaded
Open this post in threaded view
|

Re: pthreadVC2.dll dependency on MSVCR100.dll

Ross Johnson-2
On 27/11/2012 1:13 AM, Bruce Cran wrote:

> On 26/11/2012 01:30, Ross Johnson wrote:
>> At the moment this only affects "errno" AFAIK.
>>
>> The next release will allow a #define PTW32_USES_SEPARATE_CRT switch
>> to support static linking the CRT into the library but requires
>> application code changes to replace use of "errno" in some cases. But
>> the prebuilt dlls won't be compiled with that switch.
>>
>
> Thanks, that makes sense - I found the explanation in pthread.h too.

(Thanks to Daniel Richard G. for that contribution.)

> Are you planning to add a VS 2010 project file to CVS? It would be
> useful to have one since Visual Studio won't upgrade from the
> .dsp/.dsw files.
>

I've only ever used the makefiles. The .dsp/.dsw files that are there
have been contributed so if you want to send me a project file I'll
include it.