PDA

View Full Version : Puzzle about write and compile in different version?



Raul
6th November 2010, 03:42
Hi guys!
I came across a problem about write and compile in different version.The problem is that i write a Qt program in low Qt version,and compile in hight version.if it can make it?
and if i write in hight Qt version,and compile in low version.If it can make it? I want to know last is that if there is anything else constraints?

tbscope
6th November 2010, 05:30
I don't think I understand you completely.

Qt4 should be backwards binary compatible over its lifetime. This means that a program written with Qt4.1 should run with Qt4.7 libraries. But a program written with Qt4.7 is not compatible with Qt4.1 libraries. Note though that there are a few "booby traps". QThread for example is one of those. The behavior changed somewhere around Qt4.4 I think. And there might be other behavior changes.

In other words, if you write your code with Qt4.5, the minimum version of Qt installed on the user's pc should be Qt4.5

Raul
6th November 2010, 08:51
I don't think I understand you completely.

Qt4 should be backwards binary compatible over its lifetime. This means that a program written with Qt4.1 should run with Qt4.7 libraries. But a program written with Qt4.7 is not compatible with Qt4.1 libraries. Note though that there are a few "booby traps". QThread for example is one of those. The behavior changed somewhere around Qt4.4 I think. And there might be other behavior changes.

In other words, if you write your code with Qt4.5, the minimum version of Qt installed on the user's pc should be Qt4.5

But i have written a program in Qt4.6.2,and it can be compiled in Qt4.5:confused:

tbscope
6th November 2010, 08:59
But i have written a program in Qt4.6.2,and it can be compiled in Qt4.5:confused:

It can under the condition you only use code that is available to Qt4.5
If you use any new classes or members introduced in Qt4.6, you'll get compiler errors.