lists.zerezo.com



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

***BOGO*** [Mingw-users] Missing OpenThread?



I seem to be missing OpenThread. The following program:

#include <windows.h>
int main () {
  HANDLE x = OpenThread(0, FALSE, 0);
}

Fails to compile complaining about OpenThread being undefined. A look
in MinGW's windows.h reveals:

#if (_WIN32_WINNT >= 0x0500) || (_WIN32_WINDOWS >= 0x0490)
WINBASEAPI HANDLE WINAPI OpenThread(DWORD,BOOL,DWORD);
#endif

I am not sure why _WIN32_WINNT is not >= 0x0500 -- this is XP it
should be 0x0501 (what's the deal here?):

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

So I attempted to declare it myself:

#include <windows.h>
WINBASEAPI HANDLE WINAPI OpenThread(DWORD,BOOL,DWORD);
int main () {
  HANDLE x = OpenThread(0, FALSE, 0);
}

But I get undefined reference errors from the linker (even when
explicitly linking with kernel32.lib -- which is where OpenThread
should be defined).

So it seems to be missing from MinGW for some reason. Am I doing
something wrong here?

Thanks,
Jason

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users