This project has moved and is read-only. For the latest updates, please go here.

New erros after including VLD.h

Aug 11, 2012 at 3:39 PM

Hello I am new user.

 

I included VLD.h to my program, but after rebuilding it gave me new error

C2365: 'Rectangle' : redefinition; previous definition was 'function'

Before including this header it was error free. Is there any way how to correct it. Some setting or something like that.

 

Thank you.

Aug 17, 2012 at 10:57 AM

Maybe you redefine something from <windows.h>?

Aug 17, 2012 at 12:20 PM

I don't use <windows.h> header.

Aug 17, 2012 at 12:21 PM

VLD use

Sep 6, 2012 at 10:05 PM
Edited Sep 6, 2012 at 10:05 PM

I'm running into a similar, if not the same, problem.  There are a number of redefinitions in ws2def.h that are in winsock.h and then there are more redefinitions in winsock2.h.   None of the includes are in my project.

One of each situation(there are a lot more of each):

1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\ws2def.h(91): warning C4005: 'AF_IPX' : macro redefinition
1>          c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winsock.h(460) : see previous definition of 'AF_IPX'
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winsock2.h(176): error C2011: 'timeval' : 'struct' type redefinition
1>          c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winsock.h(111) : see declaration of 'timeval'
Sep 7, 2012 at 11:32 AM
Try to include <winsock2.h> before inclusion of <vld.h>.




W dniu 2012-09-06 23:05, luckyone pisze:

From: luckyone

I'm running into a similar, if not the same, problem. There are a number of redefinitions in ws2def.h that are in winsock.h and then there are more redefinitions in winsock2.h. None of the includes are in my project.

One of each situation:

1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\ws2def.h(91): warning C4005: 'AF_IPX' : macro redefinition
1>          c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winsock.h(460) : see previous definition of 'AF_IPX'


1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winsock2.h(176): error C2011: 'timeval' : 'struct' type redefinition
1>          c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winsock.h(111) : see declaration of 'timeval'


-- 
ENIGMA Systemy Ochrony Informacji Sp. z o.o.
tel. (22) 570 57 10, faks (22) 570 57 15
ul. Jutrzenki 116, 02-230 Warszawa, http://www.enigma.com.pl
numer KRS 0000160395, NIP 526-10-29-614 kapitał zakładowy 273 500 zł
Sep 7, 2012 at 7:10 PM

That worked, Thanks!