0

I am trying to build c++ ported code of libphonenumber library in windows using Visual studio. Some of its code use readdir_r() which is defined in dirent.h file.

Visual studio does not contain any dirent.h file. So after exploring I found solution that I can copy dirent.h file into "C:\Program Files\Microsoft Visual Studio 10\VC\include".

But all dirent.h file for window contain readdir() but not readdir_r(). Also fucntion signature is different.

Can I get dirent.h for windows as same in Linux. Which contain readdir_r()???

Pankaj Vavadiya
  • 481
  • 7
  • 15
  • 2
    Possible duplicate of [Microsoft Visual Studio: opendir() and readdir(), how?](http://stackoverflow.com/questions/883594/microsoft-visual-studio-opendir-and-readdir-how) – Ed Heal Jul 21 '16 at 04:17
  • I am asking about readdir_r(). Signature of readdir() and readdir_r() is different. I have solution to readdir() but I am finding about readdir_r(). Both are available in dirent.h file. – Pankaj Vavadiya Jul 21 '16 at 04:27
  • But you are not using Linux so you need to adopt a different approach – Ed Heal Jul 21 '16 at 04:30
  • @Ed Heal: Google's libphonenumber library in C++ already use this function. They provide step to build in Visual Studio 2010. https://github.com/googlei18n/libphonenumber/tree/master/cpp I just following them. – Pankaj Vavadiya Jul 21 '16 at 04:33

0 Answers0