Closed IngwiePhoenix closed 9 years ago
That's odd. I have no Windows environment to test this on. Can you give me the output of the compiler?
I converted the code to C90 code. This should fix issues on MSVC
I would - but its all German. :)
The updated version works, except for two things:
PATH_MAX
is not defined. as far as I know, it is 255 on Windows. But, I cant be sure._snprintf
is an undefined symbol. I am looking to find a solution here.I tried to cheat by using /D snprintf=_snprintf
...but then I got the "Cant open file" error and I have a slight feeling that is due to my...er...fix.
Here is what I found on snprintf: http://stackoverflow.com/questions/3976306/using-snprintf-in-a-cross-platform-application
Fixed
Works!
I also found news on the PATH_MAX
macro. A simple ifdef should totally do.
http://bytes.com/topic/c/answers/215365-path_max
So I suggest:
#ifndef PATH_MAX
#define PATH_MAX 255
#endif
Turns out its 1024 on my mac. Huh. Who ever needs such long paths though...
I just tried to compile incbin.c on my 32bit Win7 maschine and it went berserk about missing semicolons and such. Weirdly, renaming the file to
incbin.cpp
(trickingcl
into C++ mode) fixed the issue. Would be nice if you could look into this.