Qt-interest Archive, November 2006
static and shared libs mixed?
Pages: Prev | 1 | 2 | Next
Message 1 in thread
Can I use -static and -shared in the same configure line? I tried it
and I don't see any .a files in my install directory. I'd like to
be able to link Qt statically for users who don't have Qt installed,
I can just give them a binary in that case. But usually I want to
link dynamically.
--
[ signature omitted ]
Message 2 in thread
On 11/2/06, Rich Cook <wealthychef@xxxxxxxxx> wrote:
> Can I use -static and -shared in the same configure line? I tried it and I
> don't see any .a files in my install directory. I'd like to be able to
> link Qt statically for users who don't have Qt installed, I can just give
> them a binary in that case. But usually I want to link dynamically.
Yes you can compile Qt static and shared in one sweep, but you then
need to supply your users with two versions, one with Qt linked
statically in your application and one shared.
--
[ signature omitted ]
Message 3 in thread
How is this done? As I said, I tried using -static and -shared in my
configure line, but I don't see any static libs built.
Furthermore, how do I specify in my project to link statically or
dynamically?
Thanks for the help...
On Nov 1, 2006, at 11:14 PM, Robin Ericsson wrote:
> On 11/2/06, Rich Cook <wealthychef@xxxxxxxxx> wrote:
>> Can I use -static and -shared in the same configure line? I tried
>> it and I
>> don't see any .a files in my install directory. I'd like to be
>> able to
>> link Qt statically for users who don't have Qt installed, I can
>> just give
>> them a binary in that case. But usually I want to link dynamically.
>
> Yes you can compile Qt static and shared in one sweep, but you then
> need to supply your users with two versions, one with Qt linked
> statically in your application and one shared.
>
> --
> regards,
> Robin
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]
Message 4 in thread
Rich Cook <wealthychef@xxxxxxxxx> wrote on 11/02/2006 12:15:24 PM:
# How is this done? As I said, I tried using -static and -shared in my
# configure line, but I don't see any static libs built.
# Furthermore, how do I specify in my project to link statically or
# dynamically?
# Thanks for the help...
configure --help tells me to try -static-and-shared... I don't know if
it works though.
--
[ signature omitted ]
Message 5 in thread
Aha, I didn't see that, for some reason, thanks.
On Nov 2, 2006, at 12:00 PM, Gordon.Schumacher@xxxxxxxxxxx wrote:
> Rich Cook <wealthychef@xxxxxxxxx> wrote on 11/02/2006 12:15:24 PM:
>
> # How is this done? As I said, I tried using -static and -shared
> in my
> # configure line, but I don't see any static libs built.
> # Furthermore, how do I specify in my project to link statically or
> # dynamically?
> # Thanks for the help...
>
> configure --help tells me to try -static-and-shared... I don't know if
> it works though.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]
Message 6 in thread
Interesting, ./configure -help did not tell me about -static-and-
shared, and it configure rejects that opeion. What version of Qt are
you using?
On Nov 2, 2006, at 12:00 PM, Gordon.Schumacher@xxxxxxxxxxx wrote:
> Rich Cook <wealthychef@xxxxxxxxx> wrote on 11/02/2006 12:15:24 PM:
>
> # How is this done? As I said, I tried using -static and -shared
> in my
> # configure line, but I don't see any static libs built.
> # Furthermore, how do I specify in my project to link statically or
> # dynamically?
> # Thanks for the help...
>
> configure --help tells me to try -static-and-shared... I don't know if
> it works though.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]
Message 7 in thread
Rich Cook <wealthychef@xxxxxxxxx> wrote on 11/02/2006 02:56:32 PM:
# Interesting, ./configure -help did not tell me about -static-and-
# shared, and it configure rejects that opeion. What version of Qt are
# you using?
Currently 4.2.1, but I believe it's been in since 4.1.0.
--
[ signature omitted ]
Message 8 in thread
I don't have this option either in Qt4.2.0/X11 (free version)...
Josh
> # Interesting, ./configure -help did not tell me about -static-and-
> # shared, and it configure rejects that opeion. What version of Qt are
> # you using?
>
> Currently 4.2.1, but I believe it's been in since 4.1.0.
--
[ signature omitted ]
Message 9 in thread
Interesting, I'm using 4.2.1 as well. But ./configure rejected that
option. What platform are you on? I'm on linux and OS X.
Here is the output of configure --help, there is no -shared-and-static
This is the Qt/X11 Open Source Edition.
Usage: configure [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-
libdir <dir>]
[-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-
datadir <dir>]
[-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir
<dir>]
[-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
[-debug-and-release] [-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] [-no-zlib]
[-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libpng] [-
qt-libpng]
[-system-libpng] [-no-libmng] [-qt-libmng] [-system-libmng]
[-no-libjpeg]
[-qt-libjpeg] [-system-libjpeg] [-make <part>] [-no-make
<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-qdbus] [-qdbus] [-no-separate-
debug-info]
[-separate-debug-info]
[additional platform specific options (see below)]
Installation options:
These are optional, but you may specify install directories.
-prefix <dir> ...... This will install everything relative to <dir>
(default /usr/local/Trolltech/Qt-4.2.1)
* -prefix-install .... Force a sandboxed "local" installation of
Qt. This will install into
/usr/local/Trolltech/Qt-4.2.1, if this
option is
disabled then some platforms will attempt a
"system" install by placing default values to
be placed 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)
-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]
* -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.
-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-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.
-no-sql-<driver> ... Disable SQL <driver> entirely.
-qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library,
by default
none are turned on.
-plugin-sql-<driver> Enable SQL <driver> as a plugin to be
linked to
at run time.
Possible values for <driver>:
[ ibase mysql odbc psql sqlite sqlite2 ]
-system-sqlite ..... Use sqlite from the operating system.
-no-qt3support ..... Disables the Qt 3 support functionality.
* -qt3support ........ Enables the Qt 3 support functionality.
-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.
-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:
-no-zlib ........... Do not compile in ZLIB support. Implies -no-
libpng.
-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 the plugin for GIF reading
support.
-qt-gif ............ Compile the plugin for GIF reading support.
See also src/plugins/imageformats/gif/
qgifhandler.h
-no-libpng ......... Do not compile in 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 the plugin for 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 the plugin for JPEG support.
-qt-libjpeg ........ Use the libjpeg bundled with Qt.
+ -system-libjpeg .... Use libjpeg from the operating system.
See http://www.ijg.org
Additional options:
-make <part> ....... Add part to the list of parts to be built
at make time.
(libs tools examples)
-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-nis ............ Do not compile NIS support.
* -nis ............... Compile NIS support.
-no-cups............ Do not compile CUPS support.
* -cups .............. Compile CUPS support.
-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-qdbus........... Do not compile the QtDBus module.
+ -qdbus.............. Compile the QtDBus module.
-no-separate-debug-info Do not store debug information in a
separate file
* -separate-debug-info Strip debug information into a
separate .debug file
Qt/X11 only:
* -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
-no-opengl.......... Do not support OpenGL.
+ -opengl............. Enable OpenGL support.
-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-xinerama ....... Do not compile Xinerama (multihead) support.
* -xinerama .......... Compile Xinerama support.
Requires X11/extensions/Xinerama.h and
libXinerama.
-no-xcursor ........ Do not compile Xcursor support.
* -xcursor ........... Compile Xcursor support.
Requires X11/Xcursor/Xcursor.h and libXcursor.
-no-xfixes ......... Do not compile Xfixes support.
* -xfixes ............ Compile Xfixes support.
Requires X11/extensions/Xfixes.h and
libXfixes.
-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-fontconfig ..... Do not compile FontConfig (anti-aliased
font) support.
* -fontconfig ........ Compile FontConfig support.
Requires fontconfig/fontconfig.h,
libfontconfig,
freetype.h and libfreetype.
-no-tablet ......... Do not compile Tablet support.
* -tablet ............ Compile Tablet support.
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.
On Nov 2, 2006, at 3:21 PM, Gordon.Schumacher@xxxxxxxxxxx wrote:
> Rich Cook <wealthychef@xxxxxxxxx> wrote on 11/02/2006 02:56:32 PM:
>
> # Interesting, ./configure -help did not tell me about -static-and-
> # shared, and it configure rejects that opeion. What version of Qt
> are
> # you using?
>
> Currently 4.2.1, but I believe it's been in since 4.1.0.
--
[ signature omitted ]
Message 10 in thread
On 02.11.06 16:21:01, Gordon.Schumacher@xxxxxxxxxxx wrote:
> Rich Cook <wealthychef@xxxxxxxxx> wrote on 11/02/2006 02:56:32 PM:
>
> # Interesting, ./configure -help did not tell me about -static-and-
> # shared, and it configure rejects that opeion. What version of Qt are
> # you using?
>
> Currently 4.2.1, but I believe it's been in since 4.1.0.
I think you're mixing -debug-and-releas with -shared-and-static. Qt4
doesn't have the later option.
Andreas
--
[ signature omitted ]
Message 11 in thread
So then to my original question:
How do I build shared and static lib versions of Qt? Do I need a
separate install for each, one configured with -static, and one with -
shared? If they can coexist in one installation, how do I tell my
project to use one or the other?
Thanks.
On Nov 2, 2006, at 3:39 PM, Andreas Pakulat wrote:
> On 02.11.06 16:21:01, Gordon.Schumacher@xxxxxxxxxxx wrote:
>> Rich Cook <wealthychef@xxxxxxxxx> wrote on 11/02/2006 02:56:32 PM:
>>
>> # Interesting, ./configure -help did not tell me about -static-and-
>> # shared, and it configure rejects that opeion. What version of
>> Qt are
>> # you using?
>>
>> Currently 4.2.1, but I believe it's been in since 4.1.0.
>
> I think you're mixing -debug-and-releas with -shared-and-static. Qt4
> doesn't have the later option.
>
> Andreas
>
> --
> There will be big changes for you but you will be happy.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]
Message 12 in thread
On 02.11.06 16:00:09, Rich Cook wrote:
> So then to my original question:
> How do I build shared and static lib versions of Qt? Do I need a separate
> install for each, one configured with -static, and one with -shared?
I think so (never done it myself) and thus you need to run the proper
qmake, which will generate a Makefile to either statically or
dynamically link to Qt.
Andreas
--
[ signature omitted ]
Message 13 in thread
Andreas Pakulat <apaku@xxxxxx> wrote on 11/02/2006 04:39:59 PM:
# On 02.11.06 16:21:01, Gordon.Schumacher@xxxxxxxxxxx wrote:
# > Rich Cook <wealthychef@xxxxxxxxx> wrote on 11/02/2006 02:56:32 PM:
# >
# > # Interesting, ./configure -help did not tell me about -static-and-
# > # shared, and it configure rejects that opeion. What version of Qt are
# > # you using?
# >
# > Currently 4.2.1, but I believe it's been in since 4.1.0.
#
# I think you're mixing -debug-and-releas with -shared-and-static. Qt4
# doesn't have the later option.
*blink*
Now, I *know* I saw that option at some point, because I got all
excited that such a configuration was finally going to be supported...
and now it's gone.
Perhaps I saw it in a snapshot build or something... *mumble*
Serves me right for posting without checking first. :)
--
[ signature omitted ]
Message 14 in thread
Hi,
> Can I use -static and -shared in the same configure line? [...]
I don't think that works.
I usually suggest building and installing different builds of Qt into
different directories.
That's mainly because some options of the Qt build system are built into
qmake, and they're different for static and shared Qt libraries, so you
need two copies of qmake.
You don't need to build the Qt examples or Qt Designer in both cases
though. Build the whole Qt package with the shared libraries, then build
only the libraries in the static case.
--
[ signature omitted ]
Message 15 in thread
I got this response, FYI, from Trolltech
Begin forwarded message:
> From: support@xxxxxxxxxxxxx
> Date: November 3, 2006 12:02:50 PM PST
> To: Rich Cook <rcook@xxxxxxxx>
> Cc: support@xxxxxxxxxxxxx
> Subject: Re: [Issue N137343] static and shared libs mixed?
>
> This is very hard to achieve since the linker will choose the static
> library over the shared one when both are available.
>
> Currently the only way to do this is separate build trees.
>
>
> Support Engineer
> --
> Trolltech Inc
--
[ signature omitted ]
Pages: Prev | 1 | 2 | Next