Menu

#4 use of undeclared identifier '_strnicmp'; did you mean 'strnicmp'?

1.0
open
nobody
None
2020-07-05
2013-11-03
No

Building ResIL 1.7.9 on OS X 10.9 Mavericks fails:

./../src-IL/src/il_gif.cpp:115:7: error: use of undeclared identifier '_strnicmp'; did you mean 'strnicmp'?
 if (!_strnicmp(Header, "GIF87A", 6))
      ^~~~~~~~~
      strnicmp

Discussion

  • Ryan Carsten Schmidt

    I was able to work around this problem by replacing the occurrences of "_strnicmp" with "strnicmp", like they were in DevIL 1.7.8.

     
  • Skyfaller

    Skyfaller - 2013-11-03

    That is probably correct; Windows wants underscores in front of the C standard library functions, everyone does not. For portability, probably something like

    ifdef _WIN32

    define strnicmp _strnicmp

    endif

    could be added.

    Here's Microsoft's view of the situation:
    http://msdn.microsoft.com/de-de/library/ms235324%28v=vs.90%29.aspx

     
  • Skyfaller

    Skyfaller - 2014-03-17

    I have added a definition for strnicmp to il_internal.h which will be part of version 1.8.0 and have reverted the occurences of _strnicmp to strnicmp.

     
  • Ryan Carsten Schmidt

    Ok, then you can close this ticket and mark it fixed.

     

Log in to post a comment.