<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:12pt"><div><span>The strtok_s function is the secure api variant of strtok. For MinGW-w64, which is what I am using - on Windows 7, not Linux - using secure api functions requires some work done in advance. The following needs to be inserted at the beginning of param.cpp:</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="background-color: transparent;">#ifdef __MINGW32__</div><div style="background-color: transparent;">#define MINGW_HAS_SECURE_API<span class="Apple-tab-span" style="white-space:pre">        </span>1</div><div style="background-color: transparent;">#include <sec_api/string_s.h></div><div style="background-color:
 transparent;"><span></span></div><div style="background-color: transparent;">#endif</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-style: normal;">The macro MINGW_HAS_SECURE_API must be defined and string_s.h must be specifically included. With the above, x265 can be compiled successfully.</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-style: normal;"><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-style: normal;">Best regards</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'Courier New', courier, monaco, monospace,
 sans-serif; font-style: normal;">Nikos</div><div class="yahoo_quoted" style="display: block;"> <br> <br> <div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> On Monday, March 3, 2014 8:13 PM, Steve Borho <steve@borho.org> wrote:<br> </font> </div>  <div class="y_msg_container">On Mon, Mar 3, 2014 at 1:29 AM, Nikos Barkas <<a shape="rect" ymailto="mailto:nikbar2004@yahoo.com" href="mailto:nikbar2004@yahoo.com">nikbar2004@yahoo.com</a>> wrote:<div class="yqt2940282891" id="yqtfd12449"><br clear="none">> Building tip revision 288a83d fails with this message on MinGW x64:<br clear="none">><br clear="none">> c:/x265/source/common/param.cpp: In function 'int x265::parseCpuName(const<br clear="none">> char*, bool&)':<br
 clear="none">> c:/DriveD/x265Project/x265/source/common/param.cpp:738:59: error: 'strtok_s'<br clear="none">> was not declared in this scope<br clear="none">> make[2]: *** [common/CMakeFiles/common.dir/param.cpp.obj] Error 1<br clear="none">> make[1]: *** [common/CMakeFiles/common.dir/all] Error 2<br clear="none">> make: *** [all] Error 2</div><br clear="none"><br clear="none">Odd.  My MinGW wouldn't build with strtok_r, it needed the Windows strtok_s.<br clear="none"><br clear="none">Hmm, so I either need to detect this function at configure time, or<br clear="none">just implement it internally.<br clear="none"><br clear="none">Perhaps this one: <a shape="rect" href="http://stackoverflow.com/questions/12975022/strtok-r-for-mingw" target="_blank">http://stackoverflow.com/questions/12975022/strtok-r-for-mingw</a><br clear="none"><br clear="none">Just curious, but is your MinGW hosted on Linux? I'm curious why yours<br
 clear="none">does not see strtok_s.<br clear="none"><br clear="none">-- <br clear="none">Steve Borho<div class="yqt2940282891" id="yqtfd53825"><br clear="none"></div><br><br></div>  </div> </div>  </div> </div></body></html>