[CM] Issues building S7 on windows with MSVC

Iain Duncan iainduncanlists at gmail.com
Fri May 1 10:36:15 PDT 2020


Hi list, I'm trying to build S7 with MSVC 2019, and hitting some snags. I
would like to get it working on MSVC because the Max SDK targets that
compiler and it seems like it will be a real bear to get Max externals
building on gcc on windows. If anyone has insights into the issues and can
tell me what the right thing to do is, that would be lovely

Issues I'm stuck on right now, below.
Thanks!
iain

error C:2065 'F_OK': undeclared identifier (line 26134)
if (access(filename, F_OK) == 0)
      return(b);
- so F_OK is not being recognized, not sure what to do with this, it's used
in two places

error line: 39815 C2100: illegal indirection
#if MS_WINDOWS
    struct sort_r_data tmp = {arg, compar};
    qsort_s(*base, nmemb, size, &sort_r_arg_swap, &tmp);
  #else
- I assume it's qsort call as it looks different from the neighboring ones:

void local_qsort_r(void *base, size_t nmemb, size_t size, int
(*compar)(const void *, const void *, void *), void *arg)
{
#if defined(__linux__)
  qsort_r(base, nmemb, size, compar, arg);
#else
#if defined(__APPLE__) || defined(__FreeBSD__) /* not in OpenBSD or NetBSD
as far as I can tell */
  struct sort_r_data tmp = {arg, compar};
  qsort_r(base, nmemb, size, &tmp, &sort_r_arg_swap);
#else
#if MS_WINDOWS
  struct sort_r_data tmp = {arg, compar};
  qsort_s(*base, nmemb, size, &sort_r_arg_swap, &tmp);
#else
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/mailman/private/cmdist/attachments/20200501/7fa95726/attachment.html>


More information about the Cmdist mailing list