[x264-devel] VS2008 compilation error (need of replacement __WIN32__ with _WIN32)

BugMaster BugMaster at narod.ru
Sun Dec 30 20:50:42 CET 2007


On Sun, 30 Dec 2007 18:52:28 +0100, Guillaume POIRIER wrote:
> Hello,

> BugMaster a йcrit :
>> I try to compile x264 in VS2008 and get the error:
>> error LNK2019: unresolved external symbol _strtok_r referenced in function _parse_zones
>> 
>> For fixing this error I replace __WIN32__ with _WIN32 in osdep.h and it compiles
>> successfully. So here is my patch which make that changes and also
>> replace WIN32 with _WIN32 in cpu.c (I think this would be more correct)

> Do you know if this patch is only valid for VS2008, or is it valid for
> all VC++ versions?

> How about mingw? Does it define _WIN32 too? Does it need it?

> short of knowing this, I'm afraid that this patch will break other 
> development environments.

> Guillaume
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> http://mailman.videolan.org/listinfo/x264-devel

As for other VC++ versions I am sure for 99% (because this is written
in MSDN http://msdn2.microsoft.com/en-us/library/b0084kay(VS.80).aspx
and nowhere __WIN32__ in MSDN). As for MinGW it also works when this
patch applied (tested with GCC 3.4.2 and 3.4.5) and no MinGW doesn't
need this patch (can compile without it). This definition is in
windef.h (which is included in windows.h) so I think it will work in
all Windows compilers (because they all include somehow
modified/rewritten MS Platform SDK header-files).





More information about the x264-devel mailing list