Closed mcdermj closed 8 years ago
I tested this very lightly, but it does compile and run. Others will probably want to review before it's merged for good.
Hi
As said in other PR. This code shall be compiled against wx3.0. Wx 2.x is obsolete. BTW there are many places in the code where clone will replace "home made deep copy code".
73 Geoffrey F4FXL / KC3FRA
No, that's fine. I see my mistake now. On the initial look it seemed as if Raspbian and Ubuntu were still on 2.8 packages, but I've got both 3.0 and 2.x installed, but only the 2.8-dev packages installed. What a pain.
Incidentally, if that's the case, I'll set the autoconf stuff to reject wxWidgets versions < 3.0.
Hi
I think that would be the best approach. Will you close thid PR then? BTW thank you for your efforts ☺.
Done.
BTW. I'm still working on a CI setup for Windows. I've just had a lot of other things on my plate.
One thing at a time :D. I think having all projects build system the same is also very important.
Thanks a ton for the work on this!! I have also sent you a email about a dev email group.
We only have analog repeater and dummy repeater as part of the major applications that could still use this treatment. priority to dummy repeater.
The wxString::Clone() method was added to a few functions to make the code more thread safe. The method does a deep copy of the string so that multiple threads are not referring to the same data.
Unfortunately, wxString::Clone() was not added until wxWidgets 2.9. The default wxWidgets included with at least Ubuntu 15.10 is 2.8.12. It's the same on Raspbian on the Raspberry Pi. This means that this code will not compile with the default packages on these systems. It may not even run correctly.
This patch replaces the calls to wxString::Clone() with wxString(string.c_str()) instead. This creates a c_string and creates a new object. This isn't optimal, especially since it will not handle strings with embedded nulls, but I don't think this will be a problem in our code for these.