Issue with ssize_t in rarray on Windows

Issue with ssize_t in rarray on Windows

by Shashvat Varma -
Number of replies: 4

I am trying to compile the code using the given rarray file, but the compilation stops with the first error "'ssize_t' does not name a type" on line 83 in rarray. I'm not sure why this is happening. I've looked online and came across that ssize_t and SSIZE_T are different on Windows. Is there a problem with how I've installed the rarray file or is there something wrong with my C++ build? The full output log is here. I was using g++ compiler with C++17 standard. 

In reply to Shashvat Varma

Re: Issue with ssize_t in rarray on Windows

by Ramses van Zon -
Can you tell me how you installed that c++ compiler, i.e., where you got it from?
In reply to Ramses van Zon

Re: Issue with ssize_t in rarray on Windows

by Shashvat Varma -
I don't remember well because I had done this a long time ago, but I'm fairly certain I used MinGW to manage the installations.
In reply to Ramses van Zon

Re: Issue with ssize_t in rarray on Windows

by Ramses van Zon -
I tried it on a mingw installation on my laptop and did not get the error, so I don't really have a way to thoroughly debug this, but you can try to add the option "-Dssize_t=ptrdiff_t" to the compilation line, since it complains that ssize_t is not a type, and this would make it a type.
In reply to Ramses van Zon

Re: Issue with ssize_t in rarray on Windows

by Shashvat Varma -
Thank you so much, the option made the program compile! I'll try to do a clean reinstall at some point to see if that removes the need for the extra argument.