public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* RE: Visual 2005 compiler error
@ 2009-03-09 21:37 Jeff Safier
  2009-03-09 22:37 ` Ross Johnson
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Safier @ 2009-03-09 21:37 UTC (permalink / raw)
  To: Jeff Safier, pthreads-win32


Sorry, wrong error messages, I was using an older version of the pthreads code


The errors are

c:\cmalibs\pthreads\pthreads.2\pthread.h(571) : error C2040: 'pthread_t' : 'ptw32_handle_t' differs in levels of indirection from 'HANDLE'
c:\cmalibs\pthreads\pthreads.2\pthread.h(572) : error C2040: 'pthread_attr_t' : 'pthread_attr_t_ *' differs in levels of indirection from 'pthread_attr_t'
c:\cmalibs\pthreads\pthreads.2\pthread.h(575) : error C2040: 'pthread_mutex_t' : 'pthread_mutex_t_ *' differs in levels of indirection from 'CRITICAL_SECTION'
c:\cmalibs\pthreads\pthreads.2\pthread.h(576) : error C2040: 'pthread_mutexattr_t' : 'pthread_mutexattr_t_ *' differs in levels of indirection from 'pthread_mutexattr_t'
c:\cmalibs\pthreads\pthreads.2\pthread.h(673) : warning C4005: 'PTHREAD_MUTEX_INITIALIZER' : macro redefinition
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(42) : see previous definition of 'PTHREAD_MUTEX_INITIALIZER'
c:\cmalibs\pthreads\pthreads.2\pthread.h(923) : warning C4028: formal parameter 1 different from declaration
c:\cmalibs\pthreads\pthreads.2\pthread.h(923) : warning C4028: formal parameter 2 different from declaration
c:\cmalibs\pthreads\pthreads.2\pthread.h(923) : warning C4028: formal parameter 3 different from declaration
c:\cmalibs\pthreads\pthreads.2\pthread.h(923) : warning C4028: formal parameter 4 different from declaration
c:\cmalibs\pthreads\pthreads.2\pthread.h(923) : error C2375: 'pthread_create' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(61) : see declaration of 'pthread_create'
c:\cmalibs\pthreads\pthreads.2\pthread.h(925) : error C2375: 'pthread_detach' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(67) : see declaration of 'pthread_detach'
c:\cmalibs\pthreads\pthreads.2\pthread.h(933) : error C2375: 'pthread_join' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(66) : see declaration of 'pthread_join'
c:\cmalibs\pthreads\pthreads.2\pthread.h(937) : error C2375: 'pthread_cancel' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(65) : see declaration of 'pthread_cancel'
c:\cmalibs\pthreads\pthreads.2\pthread.h(1007) : error C2375: 'pthread_mutex_init' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(69) : see declaration of 'pthread_mutex_init'
c:\cmalibs\pthreads\pthreads.2\pthread.h(1009) : error C2375: 'pthread_mutex_destroy' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(73) : see declaration of 'pthread_mutex_destroy'
c:\cmalibs\pthreads\pthreads.2\pthread.h(1011) : error C2375: 'pthread_mutex_lock' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(71) : see declaration of 'pthread_mutex_lock'
c:\cmalibs\pthreads\pthreads.2\pthread.h(1018) : error C2375: 'pthread_mutex_unlock' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(72) : see declaration of 'pthread_mutex_unlock'
test.cpp
c:\cmalibs\inc\zstring.hpp(226) : warning C4996: 'mbstowcs': This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        c:\program files\microsoft visual studio 8\vc\include\stdlib.h(537) : see declaration of 'mbstowcs'
c:\cmalibs\inc\zstring.hpp(228) : warning C4996: 'mbstowcs': This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        c:\program files\microsoft visual studio 8\vc\include\stdlib.h(537) : see declaration of 'mbstowcs'
c:\cmalibs\inc\zstring.hpp(822) : warning C4996: '_i64toa': This function or variable may be unsafe. Consider using _i64toa_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        c:\program files\microsoft visual studio 8\vc\include\stdlib.h(504) : see declaration of '_i64toa'
c:\cmalibs\inc\zstring.hpp(829) : warning C4996: '_i64tow': This function or variable may be unsafe. Consider using _i65tow_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        c:\program files\microsoft visual studio 8\vc\include\stdlib.h(716) : see declaration of '_i64tow'
c:\cmalibs\inc\zstring.hpp(836) : warning C4244: 'argument' : conversion from 'Int64' to 'int', possible loss of data
c:\cmalibs\inc\zstring.hpp(836) : warning C4996: '_itoa': This function or variable may be unsafe. Consider using _itoa_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        c:\program files\microsoft visual studio 8\vc\include\stdlib.h(501) : see declaration of '_itoa'
c:\cmalibs\inc\zstring.hpp(843) : warning C4244: 'argument' : conversion from 'Int64' to 'int', possible loss of data
c:\cmalibs\inc\zstring.hpp(843) : warning C4996: '_itow': This function or variable may be unsafe. Consider using _itow_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        c:\program files\microsoft visual studio 8\vc\include\stdlib.h(675) : see declaration of '_itow'

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

* Re: Visual 2005 compiler error
  2009-03-09 21:37 Visual 2005 compiler error Jeff Safier
@ 2009-03-09 22:37 ` Ross Johnson
  0 siblings, 0 replies; 3+ messages in thread
From: Ross Johnson @ 2009-03-09 22:37 UTC (permalink / raw)
  To: Pthreads-Win32 list

Hi Jeff,

There's another definition of the pthreads API in

c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h

If this is the xml-rpc code from sourceforge, it includes a very basic 
mapping of a small part of the pthreads API to Win32 threads. So you may 
not need pthreads-win32.

Ross

Jeff Safier wrote:
> Sorry, wrong error messages, I was using an older version of the pthreads code
>
>
> The errors are
>
> c:\cmalibs\pthreads\pthreads.2\pthread.h(571) : error C2040: 'pthread_t' : 'ptw32_handle_t' differs in levels of indirection from 'HANDLE'
> c:\cmalibs\pthreads\pthreads.2\pthread.h(572) : error C2040: 'pthread_attr_t' : 'pthread_attr_t_ *' differs in levels of indirection from 'pthread_attr_t'
> c:\cmalibs\pthreads\pthreads.2\pthread.h(575) : error C2040: 'pthread_mutex_t' : 'pthread_mutex_t_ *' differs in levels of indirection from 'CRITICAL_SECTION'
> c:\cmalibs\pthreads\pthreads.2\pthread.h(576) : error C2040: 'pthread_mutexattr_t' : 'pthread_mutexattr_t_ *' differs in levels of indirection from 'pthread_mutexattr_t'
> c:\cmalibs\pthreads\pthreads.2\pthread.h(673) : warning C4005: 'PTHREAD_MUTEX_INITIALIZER' : macro redefinition
>         c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(42) : see previous definition of 'PTHREAD_MUTEX_INITIALIZER'
> c:\cmalibs\pthreads\pthreads.2\pthread.h(923) : warning C4028: formal parameter 1 different from declaration
> c:\cmalibs\pthreads\pthreads.2\pthread.h(923) : warning C4028: formal parameter 2 different from declaration
> c:\cmalibs\pthreads\pthreads.2\pthread.h(923) : warning C4028: formal parameter 3 different from declaration
> c:\cmalibs\pthreads\pthreads.2\pthread.h(923) : warning C4028: formal parameter 4 different from declaration
> c:\cmalibs\pthreads\pthreads.2\pthread.h(923) : error C2375: 'pthread_create' : redefinition; different linkage
>         c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(61) : see declaration of 'pthread_create'
> c:\cmalibs\pthreads\pthreads.2\pthread.h(925) : error C2375: 'pthread_detach' : redefinition; different linkage
>         c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(67) : see declaration of 'pthread_detach'
> c:\cmalibs\pthreads\pthreads.2\pthread.h(933) : error C2375: 'pthread_join' : redefinition; different linkage
>         c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(66) : see declaration of 'pthread_join'
> c:\cmalibs\pthreads\pthreads.2\pthread.h(937) : error C2375: 'pthread_cancel' : redefinition; different linkage
>         c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(65) : see declaration of 'pthread_cancel'
> c:\cmalibs\pthreads\pthreads.2\pthread.h(1007) : error C2375: 'pthread_mutex_init' : redefinition; different linkage
>         c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(69) : see declaration of 'pthread_mutex_init'
> c:\cmalibs\pthreads\pthreads.2\pthread.h(1009) : error C2375: 'pthread_mutex_destroy' : redefinition; different linkage
>         c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(73) : see declaration of 'pthread_mutex_destroy'
> c:\cmalibs\pthreads\pthreads.2\pthread.h(1011) : error C2375: 'pthread_mutex_lock' : redefinition; different linkage
>         c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(71) : see declaration of 'pthread_mutex_lock'
> c:\cmalibs\pthreads\pthreads.2\pthread.h(1018) : error C2375: 'pthread_mutex_unlock' : redefinition; different linkage
>         c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(72) : see declaration of 'pthread_mutex_unlock'
> test.cpp
> c:\cmalibs\inc\zstring.hpp(226) : warning C4996: 'mbstowcs': This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
>         c:\program files\microsoft visual studio 8\vc\include\stdlib.h(537) : see declaration of 'mbstowcs'
> c:\cmalibs\inc\zstring.hpp(228) : warning C4996: 'mbstowcs': This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
>         c:\program files\microsoft visual studio 8\vc\include\stdlib.h(537) : see declaration of 'mbstowcs'
> c:\cmalibs\inc\zstring.hpp(822) : warning C4996: '_i64toa': This function or variable may be unsafe. Consider using _i64toa_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
>         c:\program files\microsoft visual studio 8\vc\include\stdlib.h(504) : see declaration of '_i64toa'
> c:\cmalibs\inc\zstring.hpp(829) : warning C4996: '_i64tow': This function or variable may be unsafe. Consider using _i65tow_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
>         c:\program files\microsoft visual studio 8\vc\include\stdlib.h(716) : see declaration of '_i64tow'
> c:\cmalibs\inc\zstring.hpp(836) : warning C4244: 'argument' : conversion from 'Int64' to 'int', possible loss of data
> c:\cmalibs\inc\zstring.hpp(836) : warning C4996: '_itoa': This function or variable may be unsafe. Consider using _itoa_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
>         c:\program files\microsoft visual studio 8\vc\include\stdlib.h(501) : see declaration of '_itoa'
> c:\cmalibs\inc\zstring.hpp(843) : warning C4244: 'argument' : conversion from 'Int64' to 'int', possible loss of data
> c:\cmalibs\inc\zstring.hpp(843) : warning C4996: '_itow': This function or variable may be unsafe. Consider using _itow_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
>         c:\program files\microsoft visual studio 8\vc\include\stdlib.h(675) : see declaration of '_itow'
>   

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

* Visual 2005 compiler error
@ 2009-03-09 21:28 Jeff Safier
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Safier @ 2009-03-09 21:28 UTC (permalink / raw)
  To: pthreads-win32



I downloaded the pthreads windows dll and header files, I am now getting the following error messages. Can anyone help?


c:\cmalibs\pthreads\pthreads.1\pthread.h(603) : error C2040: 'pthread_t' : 'ptw32_handle_t' differs in levels of indirection from 'HANDLE'
c:\cmalibs\pthreads\pthreads.1\pthread.h(604) : error C2040: 'pthread_attr_t' : 'pthread_attr_t_ *' differs in levels of indirection from 'pthread_attr_t'
c:\cmalibs\pthreads\pthreads.1\pthread.h(607) : error C2040: 'pthread_mutex_t' : 'pthread_mutex_t_ *' differs in levels of indirection from 'CRITICAL_SECTION'
c:\cmalibs\pthreads\pthreads.1\pthread.h(608) : error C2040: 'pthread_mutexattr_t' : 'pthread_mutexattr_t_ *' differs in levels of indirection from 'pthread_mutexattr_t'
c:\cmalibs\pthreads\pthreads.1\pthread.h(703) : warning C4005: 'PTHREAD_MUTEX_INITIALIZER' : macro redefinition
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(42) : see previous definition of 'PTHREAD_MUTEX_INITIALIZER'
c:\cmalibs\pthreads\pthreads.1\pthread.h(953) : warning C4028: formal parameter 1 different from declaration
c:\cmalibs\pthreads\pthreads.1\pthread.h(953) : warning C4028: formal parameter 2 different from declaration
c:\cmalibs\pthreads\pthreads.1\pthread.h(953) : warning C4028: formal parameter 3 different from declaration
c:\cmalibs\pthreads\pthreads.1\pthread.h(953) : warning C4028: formal parameter 4 different from declaration
c:\cmalibs\pthreads\pthreads.1\pthread.h(953) : error C2375: 'pthread_create' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(61) : see declaration of 'pthread_create'
c:\cmalibs\pthreads\pthreads.1\pthread.h(955) : error C2375: 'pthread_detach' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(67) : see declaration of 'pthread_detach'
c:\cmalibs\pthreads\pthreads.1\pthread.h(963) : error C2375: 'pthread_join' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(66) : see declaration of 'pthread_join'
c:\cmalibs\pthreads\pthreads.1\pthread.h(967) : error C2375: 'pthread_cancel' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(65) : see declaration of 'pthread_cancel'
c:\cmalibs\pthreads\pthreads.1\pthread.h(1037) : error C2375: 'pthread_mutex_init' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(69) : see declaration of 'pthread_mutex_init'
c:\cmalibs\pthreads\pthreads.1\pthread.h(1039) : error C2375: 'pthread_mutex_destroy' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(73) : see declaration of 'pthread_mutex_destroy'
c:\cmalibs\pthreads\pthreads.1\pthread.h(1041) : error C2375: 'pthread_mutex_lock' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(71) : see declaration of 'pthread_mutex_lock'
c:\cmalibs\pthreads\pthreads.1\pthread.h(1048) : error C2375: 'pthread_mutex_unlock' : redefinition; different linkage
        c:\cmalibs\xmlrpc-c\lib\util\include\pthreadx.h(72) : see declaration of 'pthread_mutex_unlock'
Generating Code...
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 8.00.50727
Copyright (C) Microsoft Corporation. All rights reserved.
BSCMAKE: error BK1506 : cannot open file '.\test___Win32_Debug\test.sbr': No such file or directory
Build log was saved at "file://c:\bosngpss\xrslib\test___Win32_Debug\BuildLog.htm"
test - 13 error(s), 5 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========




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

end of thread, other threads:[~2009-03-09 22:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-09 21:37 Visual 2005 compiler error Jeff Safier
2009-03-09 22:37 ` Ross Johnson
  -- strict thread matches above, loose matches on Subject: below --
2009-03-09 21:28 Jeff Safier

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).