View Full Version : Region effects on static library linking or anything else

18th June 2018, 07:45
If I have developed one application.

And I want to deploy it to another region like Germany.

Is there any library dependency as region specific ?

or anything else will get effected because of another region OS ?

18th June 2018, 08:06
It depends, among other things, on how you wrote the code. For example, displaying the date. Locale independent :
QString current_date = QDate::currentDate().toString("yyyy-MM-dd"); or locale dependent :
QString current_date = QDate::currentDate().toString(Qt::DefaultLocaleSho rtDate);

18th June 2018, 08:19
Thank you..

Are there any other factors which can lead my application to crash at startup ?

18th June 2018, 18:01
Yes, a lot of them. The most common causes are that you 1) forgot to initialize a variable before you use it (like the index into an array, which causes your code to try to access invalid memory), 2) forgot to call new() to create the instance assigned to a pointer variable before using the pointer, or 3) called a function that returns a pointer and used that pointer without checking to see if the function call was successful or the pointer was valid.

Region or locale-specific details aren't usually the cause of a crash. It's almost certainly a coding error. If you don't practice safe coding by checking the return values of functions, and just assume that every function you call works correctly, then those assumptions are usually the cause of bugs at some point.

19th June 2018, 09:45
Yes I have checked this things.

But what can be the reason if my application working fine in my region , but its getting crashed at startup in another region.

I thought may be the library linking can have some bugs.

But I am unable find out the root cause.

Please give some clues regarding this issue.

19th June 2018, 17:20
But what can be the reason if my application working fine in my region , but its getting crashed at startup in another region.

Are you trying to load resources, fonts, or some other thing that might be region-specific at startup? If your code (or Qt code) tries to do this and it fails, but then tries to use the resource or font anyway, that could cause a crash.

Is you program pure Qt? Does not depend on any third-party libraries (Qt or not)? If this is Windows, are you sure you every library you are linking is 32- or 64-bit and you have not mixed debug / release versions? If not Windows, are you sure any needed run-time libraries are present on the other system?

Do you have the ability to debug the program in this other region environment?

20th June 2018, 06:36
Actually Its using qwt libraries and we have provided static linking for that.

I can't debug this code at other end environment.

I have checked with all the scenarios ,
For example, fresh system at our end which don't have QT installed or any manually installed library.
Still its working fine at our end.

So may be its region specific issue.

I have another query, is there any rules for qmake version , qt version and gcc version of system ?
Does that affect my executable ?