Compiling nedmalloc w/ DMC
Sean Kelly
sean at f4.ca
Fri Jan 5 12:55:00 PST 2007
Craig Black wrote:
>> In addition to the problem posted below, it seems that DMC's kernel32.lib
>> does not include the required functions TryEnterCriticalSection and
>> InitializeCriticalSectionAndSpinCount.
>
> After talking with Niall some more, we found that we could get rid of the
> TryEnterCriticalSection link error by adding the line
>
> #define _WIN32_WINNT 0x403
>
> before
>
> #include <windows.h>
>
> Curiosly, this did not fix the link error with
> InitializeCriticalSectionAndSpinCount. After further investigation, I found
> that both are found in DMC's kernel32.lib. Perhaps the function parameters
> are different. I still think DMC may need to upgrade it's libraries.
>
> Anyone have any other ideas?
I'm not sure if this helps, but VC8 declares this function in WinBase.h
like so:
#if (_WIN32_WINNT >= 0x0403)
WINBASEAPI
BOOL
WINAPI
InitializeCriticalSectionAndSpinCount(
__out LPCRITICAL_SECTION lpCriticalSection,
__in DWORD dwSpinCount
);
Sean
More information about the Digitalmars-d
mailing list