[sword-devel] SWORD 1.7.0RC2

Jaak Ristioja jaak at ristioja.ee
Tue Aug 6 07:29:49 MST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06.08.2013 16:05, Troy A. Griffitts 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.

Ok, I think I must have misunderstood where the discussion ended up.
First of all since none of the functions in that #ifndef block are
virtual, there's no difference in the vtable. Secondly, during
compilation time the situation you just described can be better
circumvented in ways not requiring passing -Ddefines via pkg-config
(see Greg's reply about config.h files). Thirdly, one usually gets a
runtime warning like "Symbol _XTV1MyClass has different size in shared
object, consider re-linking", or a dynamic linking error which
prevents the program from starting. Proper precautions can be taken
for most such cases to prevent any memory errors.

Anyway, I'm not arguing against using pkg-config (or *.cmake files) to
detect -I, -L and -l options which need to be passed to the
compiler/linker. With -D and other stuff things might get a bit
complicated. I still think that #defining a SWORD_VERSION macro should
instead be done in some installed header file, at least for platforms
without a working pkg-config (or for devs who don't know what
pkg-config is or how to use it).

Blessings,
Jaak

PS: Just for your information, I attached to this email a ABI
compliance checker report for compatibility between Sword 1.6.2 and
1.7.0RC2. The tool gave me some compile errors so its output might not
be fully reliable, but the file might still be informative.
PPS: For good reading on shared libraries, see
  http://www.akkadia.org/drepper/dsohowto.pdf
  http://www.akkadia.org/drepper/goodpractice.pdf
-----BEGIN PGP SIGNATURE-----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he7bQsWCSPPniCekG+c47Xl9485bNz5hStbgoP6Px
GI2ojTP+3Krj8Pb+HZ+rPYT4JobKd+IdOBJs6Hm7AXec8LayW1blMl6dnXGqp+P3
miVc1xW70wrAxVMtsIqzJxSJkhoIQdIN3mrpQIWuB3qk8l568XbIoLW5zp5JIHnB
0TITR18ADEjdDpmvIBwjBJ9oFY4aWO0uZpPfVf0XL6UNno+XYFoMM4MKe4BOrOs8
ByDjEXO8D2iIT15kzuPqb5TepXy2+FWs7gYuHk/oQ4cGA3iB3RMjbTqk49uzPUbN
yRIlUy3DEirVou0lxzOVYpc5zu3DHPjBCAUzQzIlfHNWSW+qfOLTefoXI0Ohp6+7
P1HCmV0xpwruOa5d0VIlqP60rwTq5ESJRYCpS1/aJgi/TTMqeHsWM9NBXTmSrbP4
h5aTU8UUeaGG9ZN7EDtpIvzrGsUylKoet5OhmiBIf43U7z0feEJ6UJZtFv90FPlv
CYXZoQcRq39WfdDopqktXHvNzXs4ihml8C190b9RkhqBSZzc7gcxyLyGODDfMF70
HelnI9CkKtAXwdyYN6n7faIYwegWTlfs94azI+B5BSqMhipUjNRA2H9Jl7F19UEv
kRGL9N1JkJATl0csG4bw79o506mCY+zX8Rd11vuaom6m+rjD8mNr5cvAKsOX/HfG
/aye8G6DLBpX9C/t+aV+
=Jtus
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compat_report_1.6.2_to_1.7.0RC2.html.bz2
Type: application/x-bzip
Size: 49120 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20130806/f7600b7f/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compat_report_1.6.2_to_1.7.0RC2.html.bz2.sig
Type: application/pgp-signature
Size: 2079 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20130806/f7600b7f/attachment-0001.sig>


More information about the sword-devel mailing list