Qt4.8 移植(超详细Configure的参数)

Posted 朝闻道

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Qt4.8 移植(超详细Configure的参数)相关的知识,希望对你有一定的参考价值。

Qt4.8.6 configure 参数

  • 不只是适用于Qt4.8.6,原则上适用于Qt4所有版本
Usage:  configure [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
        [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
        [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
        [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
        [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
        [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
        [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
        [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
        [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
        [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
        [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
        [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
        [-nomake <part>] [-R <string>]  [-l <string>] [-no-rpath]  [-rpath] [-continue]
        [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
        [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
        [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
        [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
        [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
        [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
        [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
        [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend] 
        [-no-openssl] [-openssl] [-openssl-linked]
        [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
        [-no-javascript-jit] [-javascript-jit]
        [-no-script] [-script] [-no-scripttools] [-scripttools] 
        [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
        [additional platform specific options (see below)]

安装选项:
Installation options:

    -qpa [name] ......... This will enable the QPA build.
                          QPA is a window system agnostic implementation of Qt.
                          If [name] is given, sets the default QPA platform (e.g xcb, cocoa).

 These are optional, but you may specify install directories.

    -prefix <dir> ...... This will install everything relative to <dir>
                         (default /usr/local/Trolltech/Qt-4.8.6)

  * -prefix-install .... Force a sandboxed "local" installation of
                         Qt. This will install into
                         /usr/local/Trolltech/Qt-4.8.6, if this option is
                         disabled then some platforms will attempt a
                         "system" install by placing default values
                         in a system location other than PREFIX.

 You may use these to separate different parts of the install:

    -bindir <dir> ......... Executables will be installed to <dir>
                            (default PREFIX/bin)
    -libdir <dir> ......... Libraries will be installed to <dir>
                            (default PREFIX/lib)
    -docdir <dir> ......... Documentation will be installed to <dir>
                            (default PREFIX/doc)
    -headerdir <dir> ...... Headers will be installed to <dir>
                            (default PREFIX/include)
    -plugindir <dir> ...... Plugins will be installed to <dir>
                            (default PREFIX/plugins)
    -importdir <dir> ...... Imports for QML will be installed to <dir>
                            (default PREFIX/imports)
    -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
                            (default PREFIX)
    -translationdir <dir> . Translations of Qt programs will be installed to <dir>
                            (default PREFIX/translations)
    -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
                            (default PREFIX/etc/settings)
    -examplesdir <dir> .... Examples will be installed to <dir>
                            (default PREFIX/examples)
    -demosdir <dir> ....... Demos will be installed to <dir>
                            (default PREFIX/demos)

 You may use these options to turn on strict plugin loading.

    -buildkey <key> .... Build the Qt library and plugins using the specified
                         <key>.  When the library loads plugins, it will only
                         load those that have a matching key.

Configure options:

 The defaults (*) are usually acceptable. A plus (+) denotes a default value
 that needs to be evaluated. If the evaluation succeeds, the feature is
 included. Here is a short explanation of each option:
(*)是默认选择的,(+)的选择需要根据评估来判断


 *  -release ........... Compile and link Qt with debugging turned off.   编译优化关,开发的时候不会进行优化
    -debug ............. Compile and link Qt with debugging turned on.   编译优化开,发布软件的时候需要使用此项
    -debug-and-release . Compile and link two versions of Qt, with and without
                         debugging turned on (Mac only).

    -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)

    -opensource ........ Compile and link the Open-Source Edition of Qt. 以开源方式发布
    -commercial ........ Compile and link the Commercial Edition of Qt.   以商业形式发布


 *  -shared ............ Create and use shared Qt libraries.
 创建使用动态共享库
    -static ............ Create and use static Qt libraries.
 创建使用静态库
 *  -no-fast ........... Configure Qt normally by generating Makefiles for all project files.
 使用通常的Makefile进行编译
    -fast .............. Configure Qt quickly by generating Makefiles only for library and subdirectory targets.  All other Makefiles are created as wrappers, which will in turn run qmake.
 快速编译,除了必要的库,其他的步骤省略或者快速编译
    -no-largefile ...... Disables large file support.
 不支持大文件
 +  -largefile ......... Enables Qt to access files larger than 4 GB.
  支持大文件
 *  -no-system-proxies . Do not use system network proxies by default.
    -system-proxies .... Use system network proxies by default.

    -no-exceptions ..... Disable exceptions on compilers that support it.
 *  -exceptions ........ Enable exceptions on compilers that support it.

    -no-accessibility .. Do not compile Accessibility support.
 *  -accessibility ..... Compile Accessibility support.

    -no-stl ............ Do not compile STL support.
 *  -stl ............... Compile STL support.
  编译STL支持
    -no-sql-<driver> ... Disable SQL <driver> entirely.
 不支持sql驱动
    -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default none are turned on.
 sql驱动支持,默认全部关闭
    -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to at run time.

                         Possible values for <driver>:
                         [  db2 ibase mysql oci odbc psql sqlite sqlite2 sqlite_symbian symsql tds ]

    -system-sqlite ..... Use sqlite from the operating system.

    -no-qt3support ..... Disables the Qt 3 support functionality.
 *  -qt3support ........ Enables the Qt 3 support functionality.
    qt3的支持
    -no-xmlpatterns .... Do not build the QtXmlPatterns module.
 +  -xmlpatterns ....... Build the QtXmlPatterns module.
                         QtXmlPatterns is built if a decent C++ compiler
                         is used and exceptions are enabled.

    -no-multimedia ..... Do not build the QtMultimedia module.
 +  -multimedia ........ Build the QtMultimedia module.

    -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
 +  -audio-backend ..... Build the platform audio backend into QtMultimedia if available.

    -no-phonon ......... Do not build the Phonon module.
 +  -phonon ............ Build the Phonon module.
                         Phonon is built if a decent C++ compiler is used.
    -no-phonon-backend.. Do not build the platform phonon plugin.
 +  -phonon-backend..... Build the platform phonon plugin.

    -no-svg ............ Do not build the SVG module.
 +  -svg ............... Build the SVG module.

    -no-webkit ......... Do not build the WebKit module.
 +  -webkit ............ Build the WebKit module.
                         WebKit is built if a decent C++ compiler is used.
    -webkit-debug ...... Build the WebKit module with debug symbols.

    -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
 +  -javascript-jit .... Build the JavaScriptCore JIT compiler.

    -no-script ......... Do not build the QtScript module.
 +  -script ............ Build the QtScript module.

    -no-scripttools .... Do not build the QtScriptTools module.
 +  -scripttools ....... Build the QtScriptTools module.

    -no-declarative ..... Do not build the declarative module.
 +  -declarative ....... Build the declarative module.

    -no-declarative-debug ..... Do not build the declarative debugging support.
 +  -declarative-debug ....... Build the declarative debugging support.

    -platform target ... The operating system and compiler you are building
                         on (linux-g++).

                         See the README file for a list of supported
                         operating systems and compilers.
    -graphicssystem <sys> Sets an alternate graphics system. Available options are:
                           raster - Software rasterizer
                           opengl - Rendering via OpenGL, Experimental!
                           openvg - Rendering via OpenVG, Experimental!

  以下是图像处理指令集
    -no-mmx ............ Do not compile with use of MMX instructions.
    -no-3dnow .......... Do not compile with use of 3DNOW instructions.
    -no-sse ............ Do not compile with use of SSE instructions.
    -no-sse2 ........... Do not compile with use of SSE2 instructions.
    -no-sse3 ........... Do not compile with use of SSE3 instructions.
    -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
    -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
    -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
    -no-avx ............ Do not compile with use of AVX instructions.
    -no-neon ........... Do not compile with use of NEON instructions.

    -qtnamespace <name>  Wraps all Qt library code in ‘namespace <name> {...}‘.
    -qtlibinfix <infix>  Renames all libQt*.so to libQt*<infix>.so.

    -D <string> ........ Add an explicit define to the preprocessor.
      预处理器定义的添加
    -I <string> ........ Add an explicit include path.
      头文件路径的添加
    -L <string> ........ Add an explicit library path.
      库路径的添加
    -help, -h .......... Display this information.

Third Party Libraries:第三方库

    -qt-zlib ........... Use the zlib bundled with Qt.
 +  -system-zlib ....... Use zlib from the operating system.
                         See http://www.gzip.org/zlib
    数据压缩库的使用
    -no-gif ............ Do not compile GIF reading support.

    -no-libtiff ........ Do not compile TIFF support.
    -qt-libtiff ........ Use the libtiff bundled with Qt.
 +  -system-libtiff .... Use libtiff from the operating system.
                         See http://www.libtiff.org

    -no-libpng ......... Do not compile PNG support.
    -qt-libpng ......... Use the libpng bundled with Qt.
 +  -system-libpng ..... Use libpng from the operating system.
                         See http://www.libpng.org/pub/png

    -no-libmng ......... Do not compile MNG support.
    -qt-libmng ......... Use the libmng bundled with Qt.
 +  -system-libmng ..... Use libmng from the operating system.
                         See http://www.libmng.com

    -no-libjpeg ........ Do not compile JPEG support.
    -qt-libjpeg ........ Use the libjpeg bundled with Qt.
 +  -system-libjpeg .... Use libjpeg from the operating system.
                         See http://www.ijg.org
   以上是图片格式支持库的使用
    -no-openssl ........ Do not compile support for OpenSSL.
 +  -openssl ........... Enable run-time OpenSSL support.
    -openssl-linked .... Enabled linked OpenSSL support.

    -ptmalloc .......... Override the system memory allocator with ptmalloc.
                         (Experimental.)

Additional options:

    -make <part> ....... Add part to the list of parts to be built at make time.
                         (libs tools examples demos docs translations)
     默认编译libs tools examples demos docs translations
    -nomake <part> ..... Exclude part from the list of parts to be built.
     不编译源码的某个部分
    -R <string> ........ Add an explicit runtime library path to the Qt
                         libraries.
    -l <string> ........ Add an explicit library.

    -no-rpath .......... Do not use the library install path as a runtime
                         library path.
 +  -rpath ............. Link Qt libraries and executables using the library
                         install path as a runtime library path. Equivalent to -R install_libpath
   是否将生成的库安装到指定目录,默认是安装目录
    -continue .......... Continue as far as possible if an error occurs.
   编译出错后尽可能继续编译
    -verbose, -v ....... Print verbose information about each step of the
                         configure process.

    -silent ............ Reduce the build output so that warnings and errors
                         can be seen more easily.

 *  -no-optimized-qmake ... Do not build qmake optimized.
    -optimized-qmake ...... Build qmake optimized.

    -no-gui ............ Don‘t build the Qt GUI library

    -no-nis ............ Do not compile NIS support.
 *  -nis ............... Compile NIS support.

    -no-cups ........... Do not compile CUPS support.
 *  -cups .............. Compile CUPS support.
                         Requires cups/cups.h and libcups.so.2.

    -no-iconv .......... Do not compile support for iconv(3).
 *  -iconv ............. Compile support for iconv(3).

    -no-pch ............ Do not use precompiled header support.
 *  -pch ............... Use precompiled header support.

    -no-dbus ........... Do not compile the QtDBus module.
 +  -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
    -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.

    -reduce-relocations ..... Reduce relocations in the libraries through extra
                              linker optimizations (Qt/X11 and Qt for Embedded Linux only;
                              experimental; needs GNU ld >= 2.18).

 *  -no-separate-debug-info . Do not store debug information in a separate file.
    -separate-debug-info .... Strip debug information into a separate file.


Qt/X11 only:

    -no-gtkstyle ....... Do not build the GTK theme integration.
 +  -gtkstyle .......... Build the GTK theme integration.

 *  -no-nas-sound ...... Do not compile in NAS sound support.
    -system-nas-sound .. Use NAS libaudio from the operating system.
                         See http://radscan.com/nas.html

    -egl ............... Use EGL instead of GLX to manage contexts.
                         When building for desktop OpenGL, this option will
                         make Qt use EGL to manage contexts rather than the
                         GLX, which is the default. Note: For OpenGL ES, EGL
                         is always used.

    -no-opengl ......... Do not support OpenGL.
 +  -opengl <api> ...... Enable OpenGL support.
                         With no parameter, this will auto-detect the "best"
                         OpenGL API to use. If desktop OpenGL is available, it
                         will be used. Use desktop, es1, or es2 for <api>
                         to force the use of the Desktop (OpenGL 1.x or 2.x),
                         OpenGL ES 1.x Common profile, or 2.x APIs instead.

     -no-openvg ........ Do not support OpenVG.
 +   -openvg ........... Enable OpenVG support.
                         Requires EGL support, typically supplied by an OpenGL
                         or other graphics implementation.

    -no-sm ............. Do not support X Session Management.
 *  -sm ................ Support X Session Management, links in -lSM -lICE.

    -no-xshape ......... Do not compile XShape support.
 *  -xshape ............ Compile XShape support.
                         Requires X11/extensions/shape.h.

    -no-xvideo ......... Do not compile XVideo support.
 *  -xvideo ............ Compile XVideo support.
                         Requires X11/extensions/Xv.h & Xvlib.h.

    -no-xsync .......... Do not compile XSync support.
 *  -xsync ............. Compile XSync support.
                         Requires X11/extensions/sync.h.

    -no-xinerama ....... Do not compile Xinerama (multihead) support.
 *  -xinerama .......... Compile Xinerama support.
                         Requires X11/extensions/Xinerama.h and libXinerama.
             By default, Xinerama support will be compiled if
                         available and the shared libraries are dynamically
                         loaded at runtime.

    -no-xcursor ........ Do not compile Xcursor support.
 *  -xcursor ........... Compile Xcursor support.
                         Requires X11/Xcursor/Xcursor.h and libXcursor.
             By default, Xcursor support will be compiled if
                         available and the shared libraries are dynamically
                         loaded at runtime.

    -no-xfixes ......... Do not compile Xfixes support.
 *  -xfixes ............ Compile Xfixes support.
                         Requires X11/extensions/Xfixes.h and libXfixes.
             By default, Xfixes support will be compiled if
                         available and the shared libraries are dynamically
                         loaded at runtime.

    -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
 *  -xrandr ............ Compile Xrandr support.
                         Requires X11/extensions/Xrandr.h and libXrandr.

    -no-xrender ........ Do not compile Xrender support.
 *  -xrender ........... Compile Xrender support.
                         Requires X11/extensions/Xrender.h and libXrender.

    -no-mitshm ......... Do not compile MIT-SHM support.
 *  -mitshm ............ Compile MIT-SHM support.
                         Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h

    -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
 *  -fontconfig ........ Compile FontConfig support.
                         Requires fontconfig/fontconfig.h, libfontconfig,
                         freetype.h and libfreetype.

    -no-xinput ......... Do not compile Xinput support.
 *  -xinput ............ Compile Xinput support. This also enabled tablet support
                         which requires IRIX with wacom.h and libXi or
                         XFree86 with X11/extensions/XInput.h and libXi.

    -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
 *  -xkb ............... Compile XKB support.

    -no-glib ........... Do not compile Glib support.
 +  -glib .............. Compile Glib support.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • 298
  • 299
  • 300
  • 301
  • 302
  • 303
  • 304
  • 305
  • 306
  • 307
  • 308
  • 309
  • 310
  • 311
  • 312
  • 313
  • 314
  • 315
  • 316
  • 317
  • 318
  • 319
  • 320
  • 321
  • 322
  • 323
  • 324
  • 325
  • 326
  • 327
  • 328
  • 329
  • 330
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336
  • 337
  • 338
  • 339
  • 340
  • 341
  • 342
  • 343
  • 344
  • 345
  • 346
  • 347
  • 348
  • 349
  • 350
  • 351
  • 352
  • 353
  • 354
  • 355
  • 356
  • 357
  • 358
  • 359
  • 360
  • 361
  • 362
  • 363
  • 364
  • 365
  • 366
  • 367
  • 368
  • 369
  • 370
  • 371
  • 372
  • 373
  • 374
  • 375
  • 376
  • 377
  • 378
  • 379
  • 380
  • 381
  • 382
  • 383
  • 384
  • 385
  • 386
  • 387
  • 388
  • 389
  • 390
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • 298
  • 299
  • 300
  • 301
  • 302
  • 303
  • 304
  • 305
  • 306
  • 307
  • 308
  • 309
  • 310
  • 311
  • 312
  • 313
  • 314
  • 315
  • 316
  • 317
  • 318
  • 319
  • 320
  • 321
  • 322
  • 323
  • 324
  • 325
  • 326
  • 327
  • 328
  • 329
  • 330
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336
  • 337
  • 338
  • 339
  • 340
  • 341
  • 342
  • 343
  • 344
  • 345
  • 346
  • 347
  • 348
  • 349
  • 350
  • 351
  • 352
  • 353
  • 354
  • 355
  • 356
  • 357
  • 358
  • 359
  • 360
  • 361
  • 362
  • 363
  • 364
  • 365
  • 366
  • 367
  • 368
  • 369
  • 370
  • 371
  • 372
  • 373
  • 374
  • 375
  • 376
  • 377
  • 378
  • 379
  • 380
  • 381
  • 382
  • 383
  • 384
  • 385
  • 386
  • 387
  • 388
  • 389
  • 390

我的编译脚本及编译过程中遇到的问题

1、编译脚本
#!/bin/bash

#Qt version 4.8.6
#VERSION=4
#PATCHLEVEL=8
#SUBLEVEL=6

#rm -rf qt-everywhere-opensource-src-$VERSION.$PATCHLEVEL.$SUBLEVEL
#rm -rf /usr/local/Trolltech/QtEmbedded-$VERSION.$PATCHLEVEL.$SUBLEVEL-arm

#tar xfvz qt-everywhere-opensource-src-$VERSION.$PATCHLEVEL.$SUBLEVEL.tar.gz
#cd qt-everywhere-opensource-src-$VERSION.$PATCHLEVEL.$SUBLEVEL
THIRDLIB=/home/kevin/SystemPorting/3rdLibs/build1.4/lib
THIRDINCLUDE=/home/kevin/SystemPorting/3rdLibs/build1.4/include
BUILDDIR=/home/kevin/SystemPorting/Qt/build-qte-4.8.6
echo yes | ./configure -prefix $BUILDDIR #以开源形式发布 默认release shared发布
         -opensource #小端字节序
         -little-endian #指定嵌入式平台为ARM
         -embedded arm #指定交叉编译的平台
         -xplatform qws/linux-arm-g++ #禁用网络模块
         -no-webkit #生成的库不安装在安装目录,需自己指定
        #    -no-rpath #图像文件格式,格式复杂,占用存储空间大,比GIF大3倍
         -qt-libtiff #键盘
    -qt-kbd-tty    
    -qt-kbd-linuxinput

#mng图片支持
         -qt-libmng  #触摸屏库,如果工具链中自带的,不用指定头文件和库文件
         -qt-mouse-tslib -I $THIRDINCLUDE -L $THIRDLIB#鼠标驱动使用PC
         -qt-mouse-pc #不加载的鼠标驱动模块
         -no-mouse-linuxtp #禁用Qt3支持
         -no-qt3support #xml文件解析
         -no-xmlpatterns #zib压缩
         -qt-zlib #gif图片支持
#-qt-gif 
         -no-gif #png图片支持
         -qt-libpng #jpeg图片支持
         -qt-libjpeg #矢量图形,使用graphics
         -svg #JAVA模块
         -no-javascript-jit          -no-script          -no-scripttools #一些指令集,用于图像处理
         -no-mmx          -no-3dnow          -no-sse          -no-sse2          -no-sse3          -no-neon          -no-ssse3          -no-sse4.1          -no-sse4.2          -no-avx  #禁用浮点格式支持
         -armfpa #-no-armfpa #不参加编译
         -nomake examples          -nomake docs          -nomake demos #打印服务
         -no-cups #显示设备驱动库
         -qt-gfx-linuxfb #屏幕支持颜色深度
-depths 16,24 #汉子支持
-qt-freetype
#数据库支持
         -qt-sql-sqlite          -plugin-sql-sqlite#快速编译,除了必要的库,其他的部分省略或者使用快速的方法处理
         -fast

#make -j4
#sudo -s make install

-qt-mouse-tslib:后面指定头文件和库与否取决于交叉编译工具中集成没集成触摸屏库,没集成的话得自己指定路径


2、出错
usr/local/arm/4.1.2/bin/../lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/bin/ld: warning: libts-0.0.so.0, needed by /home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
/home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/lib/libQtGui.so: undefined reference to `ts_read_raw‘
/home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/lib/libQtGui.so: undefined reference to `ts_open‘
/home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/lib/libQtGui.so: undefined reference to `ts_fd‘
/home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/lib/libQtGui.so: undefined reference to `ts_config‘
/home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/lib/libQtGui.so: undefined reference to `ts_close‘
/home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/lib/libQtGui.so: undefined reference to `ts_read‘
collect2: ld returned 1 exit status
make[2]: *** [deform] Error 1


解决办法
把/usr/local/tslib下的相关库
libts-0.0.so.0  libts-0.0.so.0.1.0
拷到编译器库里面/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/lib

或者 
原因分析:
第一次安装时,在第3步没有对qmake.conf文件进行修改。

解决办法:
修改QT for arm安装路径下mkspecs/qws/linux-arm-g++/qmake.conf 文件(添加lts参数):
QMAKE_CC                = arm-linux-gcc -lts
QMAKE_CXX               = arm-linux-g++ -lts
QMAKE_LINK              = arm-linux-g++ -lts
QMAKE_LINK_SHLIB        = arm-linux-g++ -lts
***************************************************************************************************************************************


3.unknow projet:libss
-nomake demos \ 参数配置出错

4. warning:
You have not explicitly asked to use pkg-config and are cross-compiling.
pkg-config will not be used to automatically query cflag/lib parameters for
dependencies

添加参数    -force-pkg-config
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140

ARM板的环境变量的配置

Qt环境变量的配置

export QTDIR=/QtDir
export PATH=$QTDIR/build-qte/bin:$PATH
export MANPATH=$QTDIR/build-qte/man:$MANPATH
export LD_LIBRARY_PATH=$QTDIR/build-qte/lib:$LD_LIBRARY_PATH
export QT_QWS_FONTDIR=$QTDIR/build-qte/lib/fonts
export QWS_MOUSE_PROTO="TSLIB:/dev/input/event8 USB:/dev/input/mouse0"
#export QWS_KEYBOARD=/dev/tty1
export QWS_SIZE=800x600
export QT_PLUGIN_PATH=$QTDIR/build-qte/plugins
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

触摸屏tslib环境变量的配置

export TSLIB_ROOT=/usr
export TSLIB_TSDEVICE=/dev/input/event8
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export POINTERCAL_FILE=/etc/pointercal
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TSLIB_ROOT/lib
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
解释:
export TSLIB_ROOT=/opt/tslib 
export TSLIB_TSDEVICE=/dev/input/event0(触摸屏设备节点文件)
export LD_LIBRARY_PATH=$TSLIB_ROOT/lib:$LD_LIBRARY_PATH
export TSLIB_FBDEVICE=/dev/fb0(framebuffer设备文件)
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts(tslib插件库目录)
export TSLIB_CONSOLEDEVICE=none(tslib运行需要的控制台,这里是LCD屏幕,设定的控制台设备为none,默认为/dev/tty)
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf(tslib模块配置文件)
export POINTERCAL_FILE=/etc/pointercal(告诉QTOPIA,pointercal文件在哪里)
export TSLIB_CALIBFILE=/etc/pointercal(指定触摸屏校准文件pintercal的存放位置)
export QWS_MOUSE_PROTO=TSLIB:/dev/input/event0(鼠标与触摸屏共存)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
 
 http://blog.csdn.net/sxpsxp12/article/details/50611633

 

以上是关于Qt4.8 移植(超详细Configure的参数)的主要内容,如果未能解决你的问题,请参考以下文章

Qt4.8.6 Embedded Linux 的编译与移植

tslib 1.4 qt4.8.6移植过程记录

海思开发板3520D移植Qt4.8.6环境变量配置

基于IMX53(freescale) ARM架构平台, Ubuntu20.xx版本下交叉编译Qt4.8.7

基于IMX53(freescale) ARM架构平台, Ubuntu20.xx版本下交叉编译Qt4.8.7

移植QT5.6到嵌入式开发板(史上最详细的QT移植教程)