Linux to Windows again...

Why, oh why, doesn’t it work…
My Linux program compiles in MSVC++ 6.0, but I get linking errors:
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>::basic_string<char,struct std::char_traits<char>,class std::allocator<

Could anyone help me???



Left with 6 errors. They all seem to be related to #include “dirent.h”
error LNK2001: unresolved external symbol _closedir
and so on…

I believe dirent.h is a system specific header that you won’t find in VC++. Given the fact you don’t get errors about a missing header and the fact that you included it with “” rather than <>, I assume that is a header you grabbed from someplace else? (I don’t have that one with my VC++ install, though it does appear in Cygwin, and Borland compilers.)

If that is the case, you should realize that just grabbing the header is not enough. You also need proper libraries, because the libraries are what contain the actual implementation of the functions in the header.

For instance, you could very easily just write a program like so…

void DummyFunction();

void main()

The compiler would be perfectly happy compiling that code. However, once it got to the linker, you would run into problems because you never actually implement DummyFunction.

Hope that helps

Ok…I realize that this is not a very OpenGL-related topic…but I hope it’s ok
The thing is, I don’t know what lib that should be included…and don’t know where to search for it. Are there maybe any other class for reading dirs that you know of?

–losing faith–


By reading dirs, I assume you mean reading a list of files in a dir? Check out the _findfirst and _findnext functions in MSDN.

I found the lib for dirent.h.
Now it works.
Thanks for your help!

–faith is back–