zigbee 编译source_zigbee_sensor_monitor_v1_2_1 vs2008 qt-win-opensource-src-4.4.3

Development with Qt 4.4.3 source and Visual Studio 2008 Express
This document describes how to set up the environment for developing Qt applications
with Visual Studio 2008 Express based on the GNU GPL v2 (“Open source”) edition of Qt
4.4.3 source distribution.
Installing Visual Studio 2008 (Visual C++ 9.0)
1. Download VS 2008 Express from http://www.microsoft.com/express/vc/
2. This will download the file vcsetup.exe which you may choose to save or run
straight away
3. After the installation completes; add the following to the PATH environment
variable: C:\Program Files\Microsoft Visual Studio 9.0\VC\bin
Qt source download
The Sensor Monitor application was built for use together with the GPLv2-licensed Qt
v4.4.3. If you plan to do further development, it is likely that you can use a newer version
of Qt instead of this specific version, without having to do much updates to the
application code itself (assuming backwards compatibility).
However, this guide will further explain how you can build the .dll libraries from the Qt
source code of the specific v4.4.3 version, for use with the Sensor Monitor application.
Please note that since the v4.4.3 was released, Nokia has begun to offer pre-built
binaries (.dll libraries) of their Qt libraries for faster deployment for application
developers who are not really interested in modifying the Qt libraries themselves. This
can save you some hours of compile time. You will need to check out
http://qt.nokia.com on your own for more details on pre-built binaries.
Getting back to compiling from source code, you can first download the v4.4.3 source
code for the Qt libraries that you need directly from the Qt FTP archive:
ftp://ftp.qt.nokia.com/qt/source/qt-win-opensource-src-4.4.3.zip
(if you are unable to retrieve the source code from the above link, please contact TI
and we will provide you this source code directly)
When it has been downloaded, unpack the zip-file into c:\qt (or a folder of your
choice). The rest of the absolute path names in this document assume c:\qt as
installation root.
Qt build
1. Set the environment variable QMAKESPEC to win32-msvc2008
2. Add c:\qt\qt-win-opensource-src-4.4.3\bin to the PATH environment
variable
3. Open a Visual Studio command prompt and navigate to the Qt installation root,
c:\qt\qt-win-opensource-src-4.4.3. Alternatively: open a Windows command
prompt and execute “C:\Program Files\Microsoft Visual Studio 9.0\VC\
vcvarsall.bat”. NB! The command MUST be between double quotes.
4. Execute configure
a. Type 2 to read the GPLv2 software license.
b. Type y if you accept the license agreement.
c. The build will now be prepared, this step will typically take minimum 30
minutes.
5. Execute nmake (this will take several hours on most machines. *zzZzZzZZ* )
Qt is now ready to be used with Visual Studio 2008 Express!

How to build the ZigBee Sensor Monitor application
1. Open a Visual Studio command prompt and navigate to the source files for the
ZigBee Sensor Monitor application. This is where the Qt project file can be found:
zsensormonitor.pro.
Type qmake on the command prompt to create the project file for VC++ 2008
Express.
2. Open the VC++ 2008 Express IDE and select the project file created above

(zsensormonitor.vcproj) and start building the application.


最后编译时会出现问题,

解决方案:工具—>选项—>项目和解决方案—>VC++目录,在可执行文件栏中加上如下路径:
$(SystemRoot)\System32 
$(SystemRoot) 
$(SystemRoot)\System32\wbem

posted on 2013-01-27 19:42  _song  阅读(404)  评论(0编辑  收藏  举报