public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* pthreadVC2.dll dependency on MSVCR100.dll
@ 2012-11-23 20:23 Bruce Cran
  2012-11-25 23:09 ` Ross Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Cran @ 2012-11-23 20:23 UTC (permalink / raw)
  To: pthreads-win32

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pthreadVC2.dll dependency on MSVCR100.dll
  2012-11-23 20:23 pthreadVC2.dll dependency on MSVCR100.dll Bruce Cran
@ 2012-11-25 23:09 ` Ross Johnson
  2012-11-26  0:02   ` Bruce Cran
  0 siblings, 1 reply; 6+ messages in thread
From: Ross Johnson @ 2012-11-25 23:09 UTC (permalink / raw)
  To: pthreads-win32

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?
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pthreadVC2.dll dependency on MSVCR100.dll
  2012-11-25 23:09 ` Ross Johnson
@ 2012-11-26  0:02   ` Bruce Cran
  2012-11-26  1:31     ` Ross Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Cran @ 2012-11-26  0:02 UTC (permalink / raw)
  To: pthreads-win32

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pthreadVC2.dll dependency on MSVCR100.dll
  2012-11-26  0:02   ` Bruce Cran
@ 2012-11-26  1:31     ` Ross Johnson
  2012-11-26 14:14       ` Bruce Cran
  0 siblings, 1 reply; 6+ messages in thread
From: Ross Johnson @ 2012-11-26  1:31 UTC (permalink / raw)
  To: pthreads-win32

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pthreadVC2.dll dependency on MSVCR100.dll
  2012-11-26  1:31     ` Ross Johnson
@ 2012-11-26 14:14       ` Bruce Cran
  2012-11-26 22:55         ` Ross Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Cran @ 2012-11-26 14:14 UTC (permalink / raw)
  To: pthreads-win32

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pthreadVC2.dll dependency on MSVCR100.dll
  2012-11-26 14:14       ` Bruce Cran
@ 2012-11-26 22:55         ` Ross Johnson
  0 siblings, 0 replies; 6+ messages in thread
From: Ross Johnson @ 2012-11-26 22:55 UTC (permalink / raw)
  To: pthreads-win32

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-11-26 22:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-23 20:23 pthreadVC2.dll dependency on MSVCR100.dll Bruce Cran
2012-11-25 23:09 ` Ross Johnson
2012-11-26  0:02   ` Bruce Cran
2012-11-26  1:31     ` Ross Johnson
2012-11-26 14:14       ` Bruce Cran
2012-11-26 22:55         ` Ross Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).