MSVC does not appreciate mixing widechar and char
BarbDev opened this issue · comments
Samples did not work till I modified tinydir_open() and tinydir_readfile() for msvc120 (2012?).
Got always the same error "could not open file/directory"n tried with different path, etc.
The string passed originaly have to be converted to widechar.
And for tinydir_readfile() some widechar string had to be converted back to char, just to resolve some warning.
Thanks for this awesome lil' lib.
see modifs here: http://pastie.org/9488270 (sorry I'm not that familiar with github, so I don't know if they are any easier way to get and compare directly both files.)
If you want to do this via github, you can do this:
- Fork the repo
- Edit tinydir.h
- Paste your changes in
- Commit
- Create a pull request (pull request tab to the right, New Pull Request)
Have you tested this under other operating systems? Just taking a quick look, haven't tried it yet, but it might need some cleanups.
No sorry, tried the library on another pc but it compiled with GCC so it worked properly.
EDIT: I must leave now, will pull a request later today.