0

I am running Visual C++ 2010 Express on Windows 7 Ultimate SP1 32-bit.
I have written a small program aimed at reading the contents of a given directory.
However, while the program compiles correctly, it will not run as it says that opendir, readdir and closedir are unsatisfied externals.
What can I do about this?

2
Contributors
2
Replies
9
Views
4 Years
Discussion Span
Last Post by normanallen
0

MS-Windows knows nothing about opendir() etc -- those are *nix functions, not MS-Windows. You need to call FineFirstFile() and FindNextFile() which work something like the *nix functions. I have posted some code snippets that use those functions if you want to look at them. If you use .NET you can probably simplify the code (link).

Edited by Ancient Dragon

0

I think I have found an alternate way of doing this so the question is no longer a problem.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.