문제

문제는 컴파일러가 STD 라이브러리에서 MySQL과 Math.H에 속하는 라이브러리 사이에 함수가 재정의되어 있다고 말합니다.

나는 이틀 동안 이것을 끝냈지 만 여전히 그것을 알아낼 수 없습니다.

이것이 누구에게도 일어난 적이 있습니까?

이것은 컴파일러의 출력입니다


C:\mingw\bin\mingw32-make.exe all 
'Building file: ../src/interfaz/ventanaconf.cpp'
'Invoking: GCC C++ Compiler'
C:\mingw\bin\mingw32-g++.exe -mms-bitfields -I"c:\dev-cpp\gtkmm\include\gtkmm-2.4" 
-I"c:\dev-cpp\gtkmm\lib\gtkmm-2.4\include" -I"c:\dev-cpp\gtkmm\include\glibmm-2.4" 
-I"c:\dev-cpp\gtkmm\lib\glibmm-2.4\include" -I"c:\dev-cpp\gtkmm\include\gdkmm-2.4" 
-I"c:\dev-cpp\gtkmm\lib\gdkmm-2.4\include" -I"c:\dev-cpp\gtkmm\include\pangomm-1.4" 
-I"c:\dev-cpp\gtkmm\include\atkmm-1.6" -I"c:\dev-cpp\gtkmm\include\sigc++-2.0" 
-I"c:\dev-cpp\gtkmm\lib\sigc++-2.0\include" -I"c:\dev-cpp\gtkmm\include\cairomm-1.0" 
-I"c:\gtk\include\gtk-2.0" 
-I"c:\gtk\include\glib-2.0" 
-I"c:\gtk\lib\glib-2.0\include" 
-I"c:\gtk\lib\gtk-2.0\include" 
-I"c:\gtk\include\pango-1.0" 
-I"c:\gtk\include\cairo" 
-I"c:\gtk\include\freetype2" 
-I"c:\gtk\include" 
-I"c:\gtk\include\atk-1.0" 
-I"c:\Archivos de programa\MySQL\MySQL Server 5.0\include" 
-O0 -g3 -w -c -fmessage-length=0 -MMD -MP -MF"src/interfaz/ventanaconf.d" 
-MT"src/interfaz/ventanaconf.d" 
-o"src/interfaz/ventanaconf.o" "../src/interfaz/ventanaconf.cpp"
In file included from c:/Archivos de programa/MySQL/MySQL Server 5.0/include/my_global.h:73,
                 from ../src/interfaz/../gestiondb/gestordb.h:6,
                 from ../src/interfaz/../gestiondb/operacionesdb.h:5,
                 from ../src/interfaz/ventanamodulos.h:20,
                 from ../src/interfaz/ventanaconf.h:27,
                 from ../src/interfaz/ventanaconf.cpp:1:
c:/Archivos de programa/MySQL/MySQL Server 5.0/include/config-win.h: **In function `double rint(double)':
c:/Archivos de programa/MySQL/MySQL Server 5.0/include/config-win.h:228: error: redefinition of `double rint(double)'
C:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/math.h:620: **error: `double rint(double)' previously defined here**
C:\mingw\bin\mingw32-make.exe: *** [src/interfaz/ventanaconf.o] Error 1**

미리 감사드립니다 !!!

도움이 되었습니까?

해결책 2

문제는 리눅스가 단순히 무시하는 포함 도서관에 관한 것이지만 Windows는 원합니다. Linux에서 그것을 내놓는 데 아무런 문제가 없습니다 ...

언젠가 나는 sooooooooooooooooooooooooo Ooo 바보 같은 느낌 : ..

다른 팁

이 스레드 MySQL 지원 영역에서는 올해 4 월 현재 Config_win.h 파일에서 Rint ()의 정의를 가져 왔음을 나타냅니다 (패치가 2006 년에 제안 되었음에도 불구하고). MySQL 소스의 버전을 최신 버전을 사용하고 있습니까?

C :/Archivos de Programa/MySQL/MySQL Server 5.0/include/config-Win.h의 228 행에서 "Rint"라는 기능의 선언/정의를 찾아야합니다. c :/mingw/bin /../ lib/gcc/mingw32/3.4.2 /../../../ include/math.h의 다른 정의를 찾아야합니다. 같은 이름 (아마도 동일하게).

문제를 해결하려면 이러한 정의 중 하나를 삭제/Outcomment/Untefine을 정의해야합니다.

링크 할 때 비슷한 문제를 겪을 준비를하십시오. 두 라이브러리를 동일한 기능으로 연결하면 두 라이브러리를 연결하십시오.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top