<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 6, 2013 at 8:05 AM, Troy A. Griffitts <span dir="ltr"><<a href="mailto:scribe@crosswire.org" target="_blank">scribe@crosswire.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">For example, consider the following code:<br>
<br>
class Q_CORE_EXPORT QString<br>
{<br>
public:<br>
...<br>
#ifndef QT_NO_REGEXP<br>
int indexOf(const QRegExp &, int from = 0) const;<br>
int lastIndexOf(const QRegExp &, int from = -1) const;<br>
inline QBool contains(const QRegExp &rx) const { return QBool(indexOf(rx) != -1); }<br>
int count(const QRegExp &) const;<br>
<br>
int indexOf(QRegExp &, int from = 0) const;<br>
int lastIndexOf(QRegExp &, int from = -1) const;<br>
inline QBool contains(QRegExp &rx) const { return QBool(indexOf(rx) != -1); }<br>
#endif<br>
<br>
...<br>
<br>
<br>
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.</blockquote>
<div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>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?</div>
<div><br></div><div>--Greg</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
On 08/06/2013 02:37 PM, Jaak Ristioja wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
On 06.08.2013 14:54, Troy A. Griffitts wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Remember, just because you compile and link doesn't mean you've<br>
successfully build your app against the exact state of the headers<br>
when the library was compiled and this can be dangerous.<br>
</blockquote>
Can you please be more specific about this danger?<br>
<br>
Blessings,<br>
Jaak<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v2.0.20 (GNU/Linux)<br>
<br>
iQgcBAEBAgAGBQJSAO4VAAoJEEqsYm<u></u>Et1rCOFsI//3EZpmRSfmleQlAU0/<u></u>myrO+7<br>
J9myjJrWzI2ysELx6Urb6u/<u></u>ErufIjakyg+<u></u>YWyd9ftJ40DMtBa4goVmP0SYsg3vfv<br>
2NwESFdJhVEYWlNZqVcW+<u></u>2utH0dDpCbPY4sovDUF6Xrum3fnDxe<u></u>iuIc55Pf2HOrF<br>
TlpK6lShxA0sSd3+<u></u>VsYmvbhW0zVfMt8Fjr5yM6t0rc7FSw<u></u>Wp5eni1W13/wmoK6l+<br>
cbTsHDEbf7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gJi4IlNejP7VsZDu5HJ070owx8nQIk<u></u>bT<br>
S+Ri7Z6L4/aaCAr+<u></u>famomlNE8JOzm87aJ+<u></u>O8zL2xMTzILy+/+jlSzkDF/oMM0ON/<br>
JyCzNWKv0dQU+VMW+<u></u>STjLD1npxODkOhA09RfmomqXmR8eVe<u></u>NbZOGarUSfJd+ZExS<br>
QtVcbCL37Cuhz6LMWshQXmURj2AQzH<u></u>XxIu0Z8bh30S4nMKoXEYLxqlf1ZfJj<u></u>ZRMv<br>
TrCO7/v7rkq/x7/MANVD1/<u></u>UYI53SA1wwgHSPn9/<u></u>guAj1sRTYh8pLVOzR/8vbVTVH<br>
vqAT3ZnezxCpXahxn9ABdYhEChSJH2<u></u>fv1PTR5az1JvZVoLZlYe5kkNVYIbx8<u></u>hMH7<br>
xm0JfztCcPEDkZ3eNfc1N0AA3aYEOG<u></u>Fgk5gU8zXRnU3tq/50/<u></u>QCay0H7fqT423Pb<br>
cv7gqcRbiQCZsEK90teXJJLnR+<u></u>lIGPMFrvj9amLwcTzZ1j9WMnxb2ptw<u></u>DjRSBIo1<br>
c6X+EP153/DM+<u></u>bAg5HxwZedcYdEdUOW6hiuQrWWHKcR<u></u>VTeIgDous9TTi4h0mviwZ<br>
2dvl54sEoWs4AED/<u></u>MR6jpf04ABu8HPN5i83e0yIjUuIAyZ<u></u>6iTYxjYSiLxlH86nVo<br>
Po0H0a5W2C3OXkFDj0XgX3DiAIh4zZ<u></u>JhaWz0yX/XTsCxcKkVKhIfzsUJ+<u></u>x8ddDvc<br>
As3sWxYttikQfzv0o2X8FzGdFEWs2+<u></u>So6jJy9ge1qSHuewVaZBAreVLauLLv<u></u>SPKe<br>
Mbe1/<u></u>IWETgWXFZgeQ6Qr72JlC8d4zxL4sT8<u></u>nnh5SacSvlqTFZfiaEr73dZ3tHZAS<br>
YYemINNFZX/Nkc4qjdGqp+<u></u>vxkM9LGSTRyf6umuwZRt7vMaq6TR/<u></u>RiE3bS51NUbU8<br>
w4Jhdc7dZA/<u></u>Jf7Z5seYaIjn3ljrBDy6+<u></u>Zzp5OxsW45ZmMhbLg3BE4M9YaIiB11<u></u>HV<br>
/<u></u>Eh3RN5aMCYGDOIt9hUHh3exSkZquUX<u></u>vXj6AKUJT0AlWhgyTgrDJ39oYxXRDk<u></u>Luq<br>
G+73l3vp52T/<u></u>6bpzMvIvqCQxrgGLbHsKQjkZaDDVin<u></u>K1krkFMwjVtkRZQMwSwZeU<br>
kOZZN5DC4i0wJPxMk0qawHMgMwHz+<u></u>T9TNXVppPRtmbVyCENOC5Bgbyn7+<u></u>25qAiji<br>
SQGw/eR+<u></u>h3ro9lquNUD6n1UZxoFABl99EgYSKB<u></u>3jYQfsMWbbZTPa8lfG7QlOJazP<br>
CD8YH198RcqAngq8F8CpHBT9xE3et3<u></u>5hon7u/VBakpI+<u></u>650BEHG4lMvMrMp5CtCD<br>
gsMDsSnIyPnjVYZ2i2/CYQ+M/<u></u>J9Hsbm7I9yBBm7HfakWuOiWiKiHuPV<u></u>869ZSd7+v<br>
N5J3wWDp9vEryOk9+<u></u>FBiqrHbdtQ6nPkmhPfEN5yExF9elN0<u></u>wXhoIi+s9c5h36aU/<br>
S1arxeReDQzE0kvjSaCnkO5TnH9Cnw<u></u>NgxZgnYxwxP8HpmNTVi+<u></u>f9eM9rBzVxqUUZ<br>
Gq6nQSHYzEm4oTb+<u></u>lCPUEfkhJ9Z2SXsGC/4v4Xd/<u></u>O1HjKgzSeM0GNzo9XyoQ1yvu<br>
9L1AqHxNd8w+k+AAmN3DFSYQfFFkD+<u></u>xpw6PA/+<u></u>E4rABTnDQCmV2lxRKCLwlRTSEZ<br>
ZKjvl8KrSV8R7xLh+<u></u>9W7Qad3ocUxfMghVL8B8VXua/<u></u>n86R7QhaezqVjSYGKeZTj/<br>
2JE7e7HORaYbSP/f+NqW<br>
=I6Gb<br>
-----END PGP SIGNATURE-----<br>
<br>
______________________________<u></u>_________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/<u></u>mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page<br>
</blockquote>
<br>
<br>
______________________________<u></u>_________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/<u></u>mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page<br>
</div></div></blockquote></div><br></div></div>