Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am creating a face detection program using dlib and opencv..while building getting following error...for ur ref

Severity Code Description Project File Line Suppression State
Error C2371 'boolean': redefinition; different basic types face_det c:\users\usuf\documents\jpeg-9b\jmorecfg.h 309

1>c:\users\usuf\documents\jpeg-9b\jmorecfg.h(309): error C2371: 'boolean': redefinition; different basic types
1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\shared\rpcndr.h(193): note: see declaration of 'boolean'
1>face.cpp

What I have tried:

1>c:\users\usuf\documents\jpeg-9b\jmorecfg.h(309): error C2371: 'boolean': redefinition; different basic types
1>c:\program files (x86)\windows kits\10\include\10.0.15063.0\shared\rpcndr.h(193): note: see declaration of 'boolean'
1>face.cpp
Posted

1 solution

Read the comment on top of the definition in the jmorecfg.h file:
/*
 * On a few systems, type boolean and/or its values FALSE, TRUE may appear
 * in standard header files.  Or you may have conflicts with application-
 * specific header files that you want to include together with these files.
 * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
 */
So just place this line on top of all files that include the file
C++
#define HAVE_BOOLEAN
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900