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?

Recommended Answers

All 2 Replies

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.