wxArtProvider and Translation Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
MortenMacFly
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Feb 09, 2006 8:13 am

Re: wxArtProvider and Translation

Post by MortenMacFly »

PB wrote: Sat May 15, 2021 1:40 pm I have noticed your Windows libraries list looks slightly different and you also have

Code: Select all

-lucrtbase
there.
Guess what: That was it! After removing this lib I do no longer get the error. I've actually no idea why it was added (it compiles just fine without).

Nevertheless this also explains why the dynamic lib as working: There is likely no function of that lib used so it doesn't get called on a dynamically linked application. On a statically linked version there will be at least some kind of init-function I guess which is the culprit.

Oh man... what a ride. :-) Thank you guys a lot! Problem solved! :!:
MortenMacFly
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Feb 09, 2006 8:13 am

Re: wxArtProvider and Translation

Post by MortenMacFly »

MortenMacFly wrote: Sun May 16, 2021 3:42 am Oh man... what a ride. :-) Thank you guys a lot! Problem solved! :!:
Kind of... :?

For the record, in case someone stumbles across this, too: The mini-application was compiling/working fine, but the actual application now gives a linker error on 32 bit:

Code: Select all

lib\libssh2.a(session.o):(.text+0x2e0): undefined reference to `_imp___difftime32'
...and on 64 bit:

Code: Select all

lib64\libssh2.a(session.o):(.text+0x365): undefined reference to `__imp__difftime64'
...and that was probably the reason why I added -lucrtbase.
Anyway... now I only have to find a solution w/o using this lib - so the problem remains "kind of" solved. :P
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxArtProvider and Translation

Post by ONEEYEMAN »

Hi,
Use Dependency Walker for that.

Thank you.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxArtProvider and Translation

Post by PB »

MortenMacFly wrote: Sun May 16, 2021 3:51 am Anyway... now I only have to find a solution w/o using this lib - so the problem remains "kind of" solved. :P
I do not understand complicated things. Having said that, I would make sure I somehow do not link to two copies of the CRT (mingw-default ancient MSVCRT and universal CRT). Where did you got the SSH2 library, was it shipped with your compiler? Where did you get wxWidgets binaries, did you built them by yourself?

For example, looking at the MSYS2 libssh2 package, there are two versions for 64-bit architecture:
mingw-w64-x86_64-libssh2
mingw-w64-ucrt-x86_64-libssh2

You also did not tell us which exact compiler distribution are you using (e.g., see my compiler toolchain identifications in my previous post) or how did you exactly built wxWidgets.
MortenMacFly
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Feb 09, 2006 8:13 am

Re: wxArtProvider and Translation

Post by MortenMacFly »

So, for the record: I've solved it (after another few hours...).

In the end it was compiler related. the MinGW compiler I use (TDM v8.1.0, 32 and 64 bit version) is simply too old and the CRT implementation does not include these functions. This problem was solved in later versions of the MinGW implementation of CRT but I cannot easily switch the compiler. So what I did is creating two libs that implement that function (one for Win32 and one for Win64).

They include this code:

32 bit:

Code: Select all

double _imp___difftime32(unsigned int       , unsigned int       );
double _imp___difftime32(unsigned int _Time1, unsigned int _Time2)
{
  unsigned int r = _Time2 - _Time1;
  if (r > _Time2)
    return -((double) (_Time1 - _Time2));
  return (double) r;
}
64 bit:

Code: Select all

double __imp__difftime64(unsigned long long       , unsigned long long       );
double __imp__difftime64(unsigned long long _Time1, unsigned long long _Time2)
{
  unsigned long long r = _Time2 - _Time1;
  if (r > _Time2)
    return -((double) (_Time1 - _Time2));
  return (double) r;
}
...then I link against these libs before the SSL lib and the issue is gone.

I think this is a very specific problem to me (but I wasn't aware of that, obviously), so I don't want to bother you any longer with this. Just whoever might stumble across the same issue will find the solution hereby.

Way better is to use a more recent compiler, of course. ;-)
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxArtProvider and Translation

Post by ONEEYEMAN »

Hi,
Why do you say you can't easily switch compiler?
All it needs is to download the new version, remove the old one and rebuild wxWidgets and your application.

Thank you.
MortenMacFly
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Feb 09, 2006 8:13 am

Re: wxArtProvider and Translation

Post by MortenMacFly »

ONEEYEMAN wrote: Sun May 16, 2021 2:12 pm Why do you say you can't easily switch compiler?
This is part of a larger project where we are forced to stick to a certain common compiler version. So either we change the compiler for all or for nothing. Currently there are simply no ressources to switch. Technically I agree with you: For this small part it would be easy.
MortenMacFly
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Feb 09, 2006 8:13 am

Re: wxArtProvider and Translation

Post by MortenMacFly »

BTW: For a few days I could not post in this forum as I were stuck in a loop that required me to over-and-over type in my password to login. Its gone now magically and works again. Weird.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxArtProvider and Translation

Post by ONEEYEMAN »

Hi,
MortenMacFly wrote: Sat May 22, 2021 4:25 am BTW: For a few days I could not post in this forum as I were stuck in a loop that required me to over-and-over type in my password to login. Its gone now magically and works again. Weird.
This happens from time to time.
Unfortunately it looks like if you complain, moderators will not be able to do anything...

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxArtProvider and Translation

Post by doublemax »

FWIW, it's the same for me. Over the last 1-2 weeks there seemed to be only small windows of time where I could log in.
Unfortunately it looks like if you complain, moderators will not be able to do anything...
We can't. We can only "moderate" users and posts, but have no access to the forum software or the server.
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxArtProvider and Translation

Post by ONEEYEMAN »

doublemax,
We should probably ask Brian on wx-dev if the site was good.

Thank you.
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2409
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: wxArtProvider and Translation

Post by evstevemd »

MortenMacFly wrote: Sat May 22, 2021 4:25 am BTW: For a few days I could not post in this forum as I were stuck in a loop that required me to over-and-over type in my password to login. Its gone now magically and works again. Weird.
I got the same issue and could not post my replies.
Glad you solved it. I think we need some sort of report form other than posting to wx-users. Not sure if PHPBB supports that)
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Post Reply