[Qgis-user] Building 1.4.0 on windows platform, dbt.h issues encountered

William Guynes william.guynes at compass-sys-inc.com
Wed Apr 21 07:21:01 PDT 2010


I am attempting to build QGIS 1.4.0 from source for a windows plaform 
(XP) using the MSYS instructions in the coding and compilation guide. I 
have downloaded the preprepared msys.zip to make things simpler.

1. The guide appears to imply MinGW is in the msys.zip file. This is not 
true. (Dropped out at some point?)

My solution: Point CMAKE gui to my MinGW that comes with Qt.

2. QTVARS.BAT appears to have disappeared in the latest Qt builds. Has 
QTENV.BAT possibly replaced it?

3. I appear to successfully get through all phases of CMAKE and have it 
generate the makefiles.

During the make, I get the following errors..

C:\dev\cpp\qgis\build>mingw32-make
[  0%] Built target svnversion
[  1%] Building CXX object 
src/core/CMakeFiles/qgis_core.dir/gps/qextserialport/qextserialenumerator.cpp.obj
C:\dev\cpp\qgis\src\core\gps\qextserialport\qextserialenumerator.cpp: In 
member function 'LRESULT QextSerialEnumerator::onDeviceChangeWin(WPARAM, 
LPARAM)':
C:\dev\cpp\qgis\src\core\gps\qextserialport\qextserialenumerator.cpp:145: 
error:  'DBT_DEVTYP_DEVICEINTERFACE' was not declared in this scope
C:\dev\cpp\qgis\src\core\gps\qextserialport\qextserialenumerator.cpp:147: 
error: 'PDEV_BROADCAST_DEVICEINTERFACE' was not declared in this scope
C:\dev\cpp\qgis\src\core\gps\qextserialport\qextserialenumerator.cpp:147: 
error: expected ';' before 'pDevInf'
C:\dev\cpp\qgis\src\core\gps\qextserialport\qextserialenumerator.cpp:149: 
error: 'pDevInf' was not declared in this scope
mingw32-make[2]: *** 
[src/core/CMakeFiles/qgis_core.dir/gps/qextserialport/qextserialenumerator.cpp.obj] 
Error 1
mingw32-make[1]: *** [src/core/CMakeFiles/qgis_core.dir/all] Error 2
mingw32-make: *** [all] Error 2

Further digging shows the define DBT_DEVTYP_DEVICEINTERFACE is in the 
<dbt.h> included in MinGW libraries, but is not getting defined because 
neither _WIN32_WINDOWS or _WIN32_WINNT is defined at all. A quick and 
dirty edit, just to see if getting past this one error would get me 
moving ahead shows that there are larger issues in dbt.h that need to be 
dealt with.

Ideas?

-- 
William




More information about the Qgis-user mailing list