cxong / tinydir

Lightweight, portable and easy to integrate C directory and file reader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.)

commented

If you want to do this via github, you can do this:

  1. Fork the repo
  2. Edit tinydir.h
  3. Paste your changes in
  4. Commit
  5. Create a pull request (pull request tab to the right, New Pull Request)
commented

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.