Compiling on win64

45 views
Skip to first unread message

Dave Brotherstone

unread,
Sep 7, 2009, 4:32:59 AM9/7/09
to scintilla-interest
Hi,
I'm building scintilla for a win64 architecture, and although it
seems to work, I get lots (as in, hundreds) of warnings, mostly due to
size_t, LRESULT and uptr_t/sptr_t being assigned to ints and vice
versa.

Has anybody looked at this, or would there be any interest in a patch
that tidied these warnings up? I'm obviously reluctant to clean these
up just for "our" copy (as part of Notepad++), then have to port the
changes as upgrades are done to Scintilla itself.

Many thanks for any comments people have.

Regards

Dave.

Robert Roessler

unread,
Sep 7, 2009, 2:04:37 PM9/7/09
to scintilla...@googlegroups.com
Dave Brotherstone wrote:
> I'm building scintilla for a win64 architecture, and although it
> seems to work, I get lots (as in, hundreds) of warnings, mostly due to
> size_t, LRESULT and uptr_t/sptr_t being assigned to ints and vice
> versa.
>
> Has anybody looked at this, or would there be any interest in a patch
> that tidied these warnings up? I'm obviously reluctant to clean these
> up just for "our" copy (as part of Notepad++), then have to port the
> changes as upgrades are done to Scintilla itself.

I have been doing Windows x64 builds of Scintilla and SciTE since late
last year... and things are not nearly so ugly as they seem to be for
you. ;)

1>SciLexer - 0 error(s), 42 warning(s)

is what I get from VC9 (VS2008), with the W4 setting. 41 of those are
"size_t to int", and 1 is

1>LINK : warning LNK4224: /OPT:NOWIN98 is no longer supported; ignored

And yes, the x64 versions work flawlessly on Vista x64 and Win7 x64. :)

In the past, IIRC Neil has indicated that he does not want the "churn"
in the source tree just to get rid of these... but eventually, who
knows, especially as more people start using Scintilla/SciTE in 64-bit form.

The interesting part is that it took very little adjustment to make
these go away - I think it was 4 files total that needed any edits.

Robert

Neil Hodgson

unread,
Sep 7, 2009, 7:23:25 PM9/7/09
to scintilla...@googlegroups.com
Robert Roessler:

> In the past, IIRC Neil has indicated that he does not want the "churn"
> in the source tree just to get rid of these...

Conversion to size_t / ssize_t / ptrdiff_t is a bit similar to
adding const to code - it tends to propagate out everywhere. The
common substitution of size_t for int to make both sides agree often
causes comparison bugs since size_t is unsigned. Another issue is that
while size_t is quite portable, I recall some issues with the
portability of ssize_t and ptrdiff_t.

Neil

Reply all
Reply to author
Forward
0 new messages