View Full Version : Linux to Windows again...
07-31-2001, 12:29 AM
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???
07-31-2001, 01:02 AM
Left with 6 errors. They all seem to be related to #include "dirent.h"
error LNK2001: unresolved external symbol _closedir
and so on...
07-31-2001, 06:00 AM
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...
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
07-31-2001, 06:07 AM
Ok...I realize that this is not a very OpenGL-related topic...but I hope it's ok http://www.opengl.org/discussion_boards/ubb/smile.gif
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?
07-31-2001, 06:15 AM
By reading dirs, I assume you mean reading a list of files in a dir? Check out the _findfirst and _findnext functions in MSDN.
07-31-2001, 06:18 AM
I found the lib for dirent.h.
Now it works.
Thanks for your help!
--faith is back--
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.