Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
By tbodine88 at 2012-03-28 12:11
I was writing a script to install the new version of passmark Burn In. I needed to check
whether whatever version of QT was installed would support it, and if not install
the appropriate libraries.
I have searched and searched for such a Qt version checker. But found little that is helpful.
So I downloaded Qt SDK 4.8.0 and cobbled this program together:
here is the main.cpp:
PHP Code:
#include <QtCore/QCoreApplication> /* A program to check the QT version against some desired version by Thomas Bodine */ int main(int argc, char *argv[]) { char * version, * minor, * subver; char * dot1, *dot2; version = strdup(qVersion()); minor = dot1 = strchr( version,'.'); minor++; dot2 = strchr( minor, '.'); subver = dot2; subver++; *dot1 = 0; *dot2 = 0; if ( argc < 4){ printf("usage:\n\t%s {major} {minor} {sub}\n%s%s%seg %s %s %s %s\n%s%s", argv[0], "\twhere \n", "\tmajor is the major version number\n", "\tminor is the minor version nuber\n" "\tsub is the subversion number\n", argv[0],version,minor,subver, "\nThis app will exit with error if the Qt version is not at least\n", "what is specified\n"); return 1; } if( strcmp( version, argv[1]) < 0 ) return 1; if (strcmp(version, argv[1]) > 0) return 0; if ( strcmp( minor, argv[2]) < 0) return 1; if ( strcmp(minor,argv[1]) > 0) return 0; if ( strcmp(subver,argv[3]) <0 ) return 1; return 0;//a.exec(); }/* end main*/
Here is the Makefile you'll need to change QTPATH for your installation
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.