www.digitalmars.com         C & C++   DMDScript  

c++.command-line - Linker problem with dirent.h

reply james.ma sbcglobal.net writes:
I have #include <dirent.h>  in my code and am using opendir(),
closedir() and readdir() in the code.

But the linker can't seem to find the routines.

Error 42: Symbol Undefined _closedir

Error 42: Symbol Undefined _readdir

Error 42: Symbol Undefined _opendir

What am I missing ?   Thanks.

James
Oct 16 2004
parent reply "Walter" <newshound digitalmars.com> writes:
Those functions are only for unix. For Win32, use Windows API functions like
FindFirstFile, FindNext, etc.

<james.ma sbcglobal.net> wrote in message
news:cksehs$24i0$1 digitaldaemon.com...
 I have #include <dirent.h>  in my code and am using opendir(),
 closedir() and readdir() in the code.

 But the linker can't seem to find the routines.

 Error 42: Symbol Undefined _closedir

 Error 42: Symbol Undefined _readdir

 Error 42: Symbol Undefined _opendir

 What am I missing ?   Thanks.

 James
Oct 16 2004
parent "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
Check out http://www.synesis.com.au/software/index.html#unixem

"Walter" <newshound digitalmars.com> wrote in message
news:cksok0$2d6a$1 digitaldaemon.com...
 Those functions are only for unix. For Win32, use Windows API
functions like
 FindFirstFile, FindNext, etc.

 <james.ma sbcglobal.net> wrote in message
 news:cksehs$24i0$1 digitaldaemon.com...
 I have #include <dirent.h>  in my code and am using opendir(),
 closedir() and readdir() in the code.

 But the linker can't seem to find the routines.

 Error 42: Symbol Undefined _closedir

 Error 42: Symbol Undefined _readdir

 Error 42: Symbol Undefined _opendir

 What am I missing ?   Thanks.

 James
Dec 06 2004