po instalacji conio2.h kompilator wyrzuca 'conflicting...

0

Pomozcie

po instalacji conio2.h i kompilacji pliku z prostym : cout << setxy(10, 10) << setclr(YELLOW) << setbk(BLUE) << "Hello";

kompilator wyrzuca serie bledow:
In file included from main.cpp
C:/Dev-Cpp/include/conio2.h error: conflicting declaration 'BLACK'
C:/Dev-Cpp/include/conio.h error: 'BLACK' has a previous declaration as COLORS BLACK' C:/Dev-Cpp/include/conio2.h:24: error: declaration of BLACK'
C:/Dev-Cpp/include/conio.h error: conflicts with previous declaration `COLORS BLACK'

C:/Dev-Cpp/include/conio2.h error: conflicting declaration 'BLUE'
C:/Dev-Cpp/include/conio.h error: 'BLUE' has a previous declaration as COLORS BLUE' C:/Dev-Cpp/include/conio2.h:25: error: declaration of BLUE'
C:/Dev-Cpp/include/conio.h error: conflicts with previous declaration `COLORS BLUE'
C:/Dev-Cpp/include/conio2.h error: conflicting declaration 'GREEN'

C:/Dev-Cpp/include/conio.h error: 'GREEN' has a previous declaration as COLORS GREEN' C:/Dev-Cpp/include/conio2.h:26: error: declaration of GREEN'
C:/Dev-Cpp/include/conio.h error: conflicts with previous declaration COLORS GREEN' C:/Dev-Cpp/include/conio2.h:27: error: conflicting declaration 'CYAN' C:/Dev-Cpp/include/conio.h:28: error: 'CYAN' has a previous declaration as COLORS CYAN'

C:/Dev-Cpp/include/conio2.h error: declaration of CYAN' C:/Dev-Cpp/include/conio.h:28: error: conflicts with previous declaration COLORS CYAN'
C:/Dev-Cpp/include/conio2.h error: conflicting declaration 'RED'
C:/Dev-Cpp/include/conio.h error: 'RED' has a previous declaration as COLORS RED' C:/Dev-Cpp/include/conio2.h:28: error: declaration of RED'
C:/Dev-Cpp/include/conio.h error: conflicts with previous declaration COLORS RED' C:/Dev-Cpp/include/conio2.h:29: error: conflicting declaration 'MAGENTA' C:/Dev-Cpp/include/conio.h:30: error: 'MAGENTA' has a previous declaration as COLORS MAGENTA'
C:/Dev-Cpp/include/conio2.h error: declaration of MAGENTA' C:/Dev-Cpp/include/conio.h:30: error: conflicts with previous declaration COLORS MAGENTA'
C:/Dev-Cpp/include/conio2.h error: conflicting declaration 'BROWN'
C:/Dev-Cpp/include/conio.h error: 'BROWN' has a previous

itd...90 pare bledow podobnej natury

0

Poprzednia wersja biblioteki conio.h musiała mieć już definicje enum COLORS. Musisz ją zamienić na "standardową" - wtedy wszystko będzie ok:

/*
 * conio.h
 * This file has no copyright assigned and is placed in the Public Domain.
 * This file is a part of the mingw-runtime package.
 * No warranty is given; refer to the file DISCLAIMER within the package.
 *
 * Low level console I/O functions. Pretty please try to use the ANSI
 * standard ones if you are writing new code.
 *
 */

#ifndef	_CONIO_H_
#define	_CONIO_H_

/* All the headers include this file. */
#include <_mingw.h>

#ifndef RC_INVOKED

#ifdef	__cplusplus
extern "C" {
#endif

_CRTIMP char* __cdecl	_cgets (char*);
_CRTIMP int __cdecl	_cprintf (const char*, ...);
_CRTIMP int __cdecl	_cputs (const char*);
_CRTIMP int __cdecl	_cscanf (char*, ...);

_CRTIMP int __cdecl	_getch (void);
_CRTIMP int __cdecl	_getche (void);
_CRTIMP int __cdecl	_kbhit (void);
_CRTIMP int __cdecl	_putch (int);
_CRTIMP int __cdecl	_ungetch (int);


#ifndef	_NO_OLDNAMES

_CRTIMP int __cdecl	getch (void);
_CRTIMP int __cdecl	getche (void);
_CRTIMP int __cdecl	kbhit (void);
_CRTIMP int __cdecl	putch (int);
_CRTIMP int __cdecl	ungetch (int);

#endif	/* Not _NO_OLDNAMES */


#ifdef	__cplusplus
}
#endif

#endif	/* Not RC_INVOKED */

#endif	/* Not _CONIO_H_ */

1 użytkowników online, w tym zalogowanych: 0, gości: 1