[sword-devel] SWORD_VERSION

Troy A. Griffitts scribe at crosswire.org
Sun Oct 23 15:44:14 MST 2011


You can use a few things:

CFLAGS += -DSWORD_VERSION=`pkg-config --modversion sword`

_________________

#include <swversion.h>
#include <iostream>

using namespace sword;
using namespace std;

int main(int argc, char **argv) {

      cout << SWVersion::currentVersion << endl;

      return 0;
}

_______________

#include <sword/config.h>
#include <iostream>

using namespace std;

int main(int argc, char **argv) {

     cout << PACKAGE_VERSION << endl;

     return 0;
}

__________________

Hope this helps,

Troy




On 10/23/2011 2:45 PM, Jaak Ristioja wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello!
>
> Could the Sword library please provide a SWORD_VERSION (and possibly
> SWORD_VERSION_STR) macro alike the QT_VERSION macro in Qt (see
> http://doc.qt.nokia.com/latest/qtglobal.html#QT_VERSION ). This would
> allow compilation of applications using Sword to be more easily
> (backward and forward) compatible with different Sword versions. Thanks!
>
> Blessings!
> Jaak Ristioja
> BibleTime team
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.17 (GNU/Linux)
>
> iQgcBAEBAgAGBQJOpIryAAoJELeXyoqzFNdNp1g//3P6I7E9tdepf5csifjULszw
> TJnLmxbsQEBPs+8yKe21c5ml9j5jlPiXip4BomV1ZPRDO8naF+qPsHG279OXeSYA
> 3wVblNi9HuT9G4SKpK5gWvtMuCaEIUedStWcgcfLXa7dyQoozIalCd5fbfeOH9tE
> 2CgiARNh9u0jWNM+hUvf0GLkoVCN6nLOgCRO8hHqbnvR2bw3lw97KBAw8F0KNSUo
> 8SKB5MMwEsZa4nw5LWNwBYBZaSM1i9af2Nye0ChG2vjHrjyfbGv8e0CSewcCEcJd
> OAtsm5slC3LBeMDfBVoXQlDvOewKT3GUeEBC5ClcunS3yPDMHfuBBWBMJesSasN4
> q4mf453BMjSiyPXn+FFM+8iP47l4wRlvBC4PEvFTII9/5N3xCuYUYa3NGptZptqS
> 7bU/ZN91pUztsVCrLfLuz45aE2mBS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H
> TGqnsNOtEjYc+7MBgaHd1pP675inrZ6mc4GFjb5AhjJVFp8leyK+hczyc27Od3nD
> nCoFSgZ02fJKQkpOTBVZxfzzriSdMqevEBgLvcYZy542pd9IDTURykQVuEi1/XpT
> GWQPExbq0e8y161SgwIRqkmkFn6Xn8gAuISz1qSANUuWD3lFH5Y95JKdSE17Oyac
> MoH5p5Z39+YYOat57dZy
> =WOoU
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list