[sword-devel] SWORD 1.7.0RC2
Greg Hellings
greg.hellings at gmail.com
Tue Aug 6 06:49:43 MST 2013
On Tue, Aug 6, 2013 at 8:05 AM, Troy A. Griffitts <scribe at crosswire.org>wrote:
> For example, consider the following code:
>
> class Q_CORE_EXPORT QString
> {
> public:
> ...
> #ifndef QT_NO_REGEXP
> int indexOf(const QRegExp &, int from = 0) const;
> int lastIndexOf(const QRegExp &, int from = -1) const;
> inline QBool contains(const QRegExp &rx) const { return
> QBool(indexOf(rx) != -1); }
> int count(const QRegExp &) const;
>
> int indexOf(QRegExp &, int from = 0) const;
> int lastIndexOf(QRegExp &, int from = -1) const;
> inline QBool contains(QRegExp &rx) const { return QBool(indexOf(rx) !=
> -1); }
> #endif
>
> ...
>
>
> If this library was compiled with QT_NO_REGEXP defined, and you include
> this header file in your project and build without QT_NO_REGEXP defined,
> then your .o files will expect different vtables than what are provided by
> the compiled library.
It seems like relying on pkg-config to convey this, for a library that is
otherwise so cross-platform compatible, is a bad strategy. pkg-config is
available on every Linux distribution I've used but it's definitely not
guaranteed to be present in other Unixes (I had trouble installing it on
Solaris the last time I built apps there) and Windows lacks any coherent
implementation of this.
Following on your example, Qt on Fedora includes a file
/usr/include/QtCore/qconfig-64.h and several others that define the
necessary pre-processor macros. Installing such a file for Sword would
alleviate the need to depend on pkg-config where it's not available.
BibleTime does not rely on pkg-config because it's not available when the
official Windows distribution is built. Xiphos builds its official Windows
version by cross-compiling within Linux and thus is able to leverage
pkg-config. BibleTime has, hitherto, done its Sword version checking by
compiling a sample program and running it, taking advantage of the material
in SWVersion. This is, in general, a bad hack and doesn't lend itself to
cross-building very well. Choosing to ensconce this information into a
config.h file - even if it is installed as something other than config.h -
would go a long way to improving this behavior.
For reference, I have installed config.h files from wxWidgets, CLucene,
grub and Perl on my system right now. Far more if we include files named
*config.h (libstdc++, fontconfig, freetype2, gtk-3.0/gdk, json, python,
ICU, glib2). If we later implement Jaak's suggestion to change includes
from #include <swkey.h> to #include <sword/swkey.h> and such, that would
allow us to directly install config.h and reference it as #include
<sword/config.h> when it's needed. Changing its name to swconfig.h (which
seems to be more the consensus among other libraries) would make the change
relatively trivial. Maybe, then, it's something that wouldn't be a 1.7
thing but could be targeted for 1.8?
--Greg
>
>
>
>
>
> On 08/06/2013 02:37 PM, Jaak Ristioja wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 06.08.2013 14:54, Troy A. Griffitts wrote:
>>
>>> Remember, just because you compile and link doesn't mean you've
>>> successfully build your app against the exact state of the headers
>>> when the library was compiled and this can be dangerous.
>>>
>> Can you please be more specific about this danger?
>>
>> Blessings,
>> Jaak
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v2.0.20 (GNU/Linux)
>>
>> iQgcBAEBAgAGBQJSAO4VAAoJEEqsYm**Et1rCOFsI//3EZpmRSfmleQlAU0/**myrO+7
>> J9myjJrWzI2ysELx6Urb6u/**ErufIjakyg+**YWyd9ftJ40DMtBa4goVmP0SYsg3vfv
>> 2NwESFdJhVEYWlNZqVcW+**2utH0dDpCbPY4sovDUF6Xrum3fnDxe**iuIc55Pf2HOrF
>> TlpK6lShxA0sSd3+**VsYmvbhW0zVfMt8Fjr5yM6t0rc7FSw**Wp5eni1W13/wmoK6l+
>> cbTsHDEbf7oWdynonxVZag3uewpAdX**IzJ0r7gZ0+sRKvQCwqRBlAclJFGL/**feUjS
>> jhGbtsnSjCKvfpKojfWzvgsaw100yH**cVDjBFni4ubwEv/**XpvHaNoh126G7x929ln
>> 65YVOHBZVVbSdGU6PpVn/GC8X7WT/**VTa+IEJxl7vhK/**TcDRo5L1wpo0RgY75DT6E
>> dvGoPw/**umPZYiR5mz0Rv1dk8V4VpJi7DV3n8Z**zNC6KsZELwsBelW1r0JsUCGJ3Lo
>> l8Y3jKDmIPRzU3Ej0X/**6KqZyNdunPXbPDBDxuQAq5WFtiKVOs**AfZAYso2dvfuTV6
>> EFs7k5mC4sAgZuVXX1nLJMCOw93qZA**fsg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zEm4oTb+**lCPUEfkhJ9Z2SXsGC/4v4Xd/**O1HjKgzSeM0GNzo9XyoQ1yvu
>> 9L1AqHxNd8w+k+AAmN3DFSYQfFFkD+**xpw6PA/+**E4rABTnDQCmV2lxRKCLwlRTSEZ
>> ZKjvl8KrSV8R7xLh+**9W7Qad3ocUxfMghVL8B8VXua/**n86R7QhaezqVjSYGKeZTj/
>> 2JE7e7HORaYbSP/f+NqW
>> =I6Gb
>> -----END PGP SIGNATURE-----
>>
>> ______________________________**_________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/**mailman/listinfo/sword-devel<http://www.crosswire.org/mailman/listinfo/sword-devel>
>> Instructions to unsubscribe/change your settings at above page
>>
>
>
> ______________________________**_________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/**mailman/listinfo/sword-devel<http://www.crosswire.org/mailman/listinfo/sword-devel>
> Instructions to unsubscribe/change your settings at above page
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20130806/cba55a74/attachment.html>
More information about the sword-devel
mailing list