Re: issues upgrading from 1.7.74 to 1.7.77 on MSVC15

[email protected]
Newsgroups gmane.comp.lib.fox-toolkit.user
Message-ID <[email protected]>
On 2021-12-29 16:22, Pof wrote:
> Dear Wuping,
> thanks for sharing!
> Regards
> Pof
> 
> Le 28/12/2021 à 05:40, Wuping Xin a écrit :
>> For Issue #1,  I would change those _InterlockedXXXX to 
>> InterlockedXXX,  for example,  _InterlockedAdd64 to 
>> InterlockedAddAdd64 (i.e., WITHOUT the leading underscore).

It may be a compiler issue...

>>> Dear all, dear Jeroen,
>>> 
>>> I am trying to update from Fox1.7.74 to Fox1.7.77 (MSVC15), and I am 
>>> have 3 issues.
>>> First 2 issues are mostly for the record (so they are not proper 
>>> issues), but the 3rd issue is the most problematic to me.
>>> 
>>> ______
>>> Issue #1:
>>> Tried to compile Fox 1.7.77 on MSVC 2017 leads to the following 
>>> errors:
>>>     2>d:\dev\fox\fox-1.7.74vc15\lib\fxatomic.cpp(268): error C3861: 
>>> '_InterlockedAdd64' : identificateur introuvable
>>>     2>d:\dev\fox\fox-1.7.74vc15\lib\fxatomic.cpp(427): error C3861: 
>>> '_InterlockedAdd64' : identificateur introuvable
>>> I tried to include the following header in fxatomic.cpp, but this 
>>> does not solve the problem:
>>>    #include "Windows.h"
>>> 
>>> Error comes from _InterlockedAdd64().
>>> I thus replaced with _InterlockedExchangeAdd64() (lines 268 & 427) in 
>>> FXAtomic as follows:
>>> Original line #268
>>>   return _InterlockedAdd64(ptr,v);
>>> Modified line #268
>>>   _InterlockedExchangeAdd64(ptr,v);
>>>   return *ptr;
>>> Original line 427
>>>    return _InterlockedAdd64(reinterpret_cast<volatile 
>>> FXlong*>(ptr),v);
>>> Modified line #427
>>>   _InterlockedExchangeAdd64(reinterpret_cast<volatile 
>>> FXlong*>(ptr),v);
>>>   return *ptr;
>>> 
>>> _______
>>> Issue #2:
>>> At link, FXSemaphore produced tons of compilation warning
>>> Orginal line #58
>>>   FXuint getSize() const { return queue.getSize(); }
>>> Modified line #58
>>>   FXuint getSize() const { return (FXuint)queue.getSize(); }
>>> remove these warnings.

Changed type of the queue length parameter to make error go away;
it is due to FXPtrQueue change for 64-bit machines..


>>> 
>>> _______
>>> Issue #3:
>>> After successful compiling and linking of Fox1.7.77 (with the above 
>>> slight modifications), I compiled and inked with application with 
>>> Fox1.7.77
>>> The issue i am facing relates to display of accentuated characters 
>>> (like é, è, à...) in many dialog boxes.
>>> E.g. in Fox1.7.74, I used to do things like this:
>>>   FX88591Codec codec;
>>>   FXString stInfo = codec.mb2utf("Accentuated char à testing");
>>>   FXMessageBox::information(this, MBOX_OK, "Information", 
>>> stInfo.text());
>>> However, this does not work anymore in Fox1.7.77, i.e. in the above 
>>> example the dialog only displays "Accentuated char à" instead of the 
>>> full string "Accentuated char à testing"!
>>> Any idea where this may come from?

There are several possibilities:

1) your text editor/IDE actually does UTF8 and the string you're feeding
the compiler isn't 8859-1 but utf8.  Needless to say, when interpreting
utf8 as 8859-1 the translation doesn't do what you expect.

2) Is compiler actually seeing a string of 8-bit characters or 16-bit
unicode?

One of these is surely the problem...

     -- JVZ


_______________________________________________
Foxgui-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/foxgui-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.