Preparing Qt for building
>configure.exe -debug-and-release -plugin-sql-mysql
Configuring the MySQL-plugin
>cd src\plugins\sqldrivers\mysql
>set MYSQL_PATH=c:mysql
>reimp -d %MYSQL_PATH%\lib\opt\libmysql.lib
>dlltool -k --input-def LIBMYSQL.def --dllname libmysql.dll --output-lib libmysql.a
>qmake "INCLUDEPATH+=%MYSQL_PATH%include" "LIBS+=-L. -lmysql" mysql.pro
Building Qt
mingw32-make sub-src
qt\plugins\sqldrivers 폴더에 가면 libqsqlmysql4.a libqsqlmysqld4.a 가 만들어져있다. 이걸 lib 폴더에 넣는다.
mysql 폴더에 있는 libmysql.dll 파일을 path가 설정된 폴더에 집어 넣는다..
않넣으면 드라이버가 로드가 안된다는 소리를 들을 수 있을 거다. path가 설정된 폴더에 않넣을꺼면 실행 파일이 있는데다 넣는다.
배포 할때도 마찮가지 실행파일이 있는데다가 같이 첨부해서 배포 ..
참고사이트
http://creon.tistory.com/170
http://christopher.rasch-olsen.no/2009/04/14/qt-45-and-mysql-plugin-with-mingw-on-windows-xp/
'Qt' 카테고리의 다른 글
Qt wince6.0 opengl 컴파일 (1) | 2011.06.28 |
---|---|
MySQL - Qt 한글 출력문제 (0) | 2011.06.27 |
qt 이미지 출력 (0) | 2011.06.03 |
qt project file(.pro) (0) | 2011.05.16 |
형변환, 숫자, 문자, int, QString (0) | 2011.04.18 |