Overview
Features
Download
Documentation
Community
Add-Ons & Services

Windows compile error

Please post support and help requests here.

Windows compile error

Postby panxpress » 20 Jul 2008, 11:07

Greetings,

I am trying to develop a cross-platorm application using Poco. I did a basic project setup on linux and compiled it. It works fine.

Now when I used the same files on windows, I am getting the following error in Poco:

includepocomutex_win32.h(89) : error C3861: 'TryEnterCriticalSection': identifier not found

Is this a known error. Is there a way I can fix this?

Thanks,


panxpress
 
Posts: 7
Joined: 14 Jun 2008, 09:43

Re: Windows compile error

Postby panxpress » 20 Jul 2008, 11:20

> I am trying to develop a cross-platorm application using Poco. I did a basic project setup on linux and compiled it. It works fine.
>
> Now when I used the same files on windows, I am getting the following error in Poco:
>
> includepocomutex_win32.h(89) : error C3861: 'TryEnterCriticalSection': identifier not found


OK, I found a solution. I was not using pre compiled headers. I added precompiled header and the first thing I added was

#ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x400
#endif

This solved the error.
panxpress
 
Posts: 7
Joined: 14 Jun 2008, 09:43

Re: Windows compile error

Postby Standard » 20 Jul 2008, 11:25

> Greetings,
>
> I am trying to develop a cross-platorm application using Poco. I did a basic project setup on linux and compiled it. It works fine.
>
> Now when I used the same files on windows, I am getting the following error in Poco:
>
> includepocomutex_win32.h(89) : error C3861: 'TryEnterCriticalSection': identifier not found
>
> Is this a known error. Is there a way I can fix this?
>
> Thanks,

Is that the only error? It sounds like you're lack of the _WIN32_WINNT macro definition which should be greater or equal to 0x0400 since TryEnterCriticalSection support start with Windows 2000

See: http://msdn.microsoft.com/en-us/library/ms686857(VS.85).aspx

Regards,
Standard

Edit: well I was a little bit slow with my reply ^^
Standard
 
Posts: 4
Joined: 30 Jun 2008, 14:23
Location: Germany

Re: Re: Windows compile error

Postby Standard » 20 Jul 2008, 11:26

Cool you figured it out!

:)

Greetings,
Standard
Standard
 
Posts: 4
Joined: 30 Jun 2008, 14:23
Location: Germany

Re: Re: Windows compile error

Postby alex » 20 Jul 2008, 15:36

> This solved the error.

It should build without any interventions, though. What version of POCO/Visual Studio are you using?
alex
 
Posts: 1101
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest