Results 1 to 7 of 7

Thread: Region effects on static library linking or anything else

  1. #1
    Join Date
    Jun 2018
    Posts
    10
    Thanks
    2
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11

    Default Region effects on static library linking or anything else

    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 ?

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Region effects on static library linking or anything else

    It depends, among other things, on how you wrote the code. For example, displaying the date. Locale independent :
    Qt Code:
    1. QString current_date = QDate::currentDate().toString("yyyy-MM-dd");
    To copy to clipboard, switch view to plain text mode 
    or locale dependent :
    Qt Code:
    1. QString current_date = QDate::currentDate().toString(Qt::DefaultLocaleShortDate);
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to Lesiok for this useful post:

    Tanu@123 (18th June 2018)

  4. #3
    Join Date
    Jun 2018
    Posts
    10
    Thanks
    2
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Region effects on static library linking or anything else

    Thank you..

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

  5. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Region effects on static library linking or anything else

    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.
    Last edited by d_stranz; 18th June 2018 at 19:04.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  6. The following user says thank you to d_stranz for this useful post:

    Tanu@123 (19th June 2018)

  7. #5
    Join Date
    Jun 2018
    Posts
    10
    Thanks
    2
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Region effects on static library linking or anything else

    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.

  8. #6
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Region effects on static library linking or anything else

    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?
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  9. #7
    Join Date
    Jun 2018
    Posts
    10
    Thanks
    2
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Region effects on static library linking or anything else

    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 ?

Similar Threads

  1. Linking Static Library with Qt Creator
    By augusbas in forum Qt Tools
    Replies: 3
    Last Post: 12th September 2013, 07:08
  2. Replies: 2
    Last Post: 11th August 2012, 18:37
  3. Linking a foreign static library using QtCreator
    By gib in forum Qt Programming
    Replies: 0
    Last Post: 22nd September 2010, 03:52
  4. Linking to a static library on Windows
    By rexi in forum Qt Programming
    Replies: 9
    Last Post: 27th July 2009, 20:54
  5. Trouble linking static library
    By russdot in forum Qt Programming
    Replies: 3
    Last Post: 17th May 2009, 11:56

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.