![]() |
#include <dirent.h>
Im using MSVC++ 6.0 in WinXP... Do I need to download "dirent.h" from somewhere and if I do, where should I put it? Right now I've downloaded it and put it in the same folder as my program.
error C2065: 'scandir' : undeclared identifier error C2065: 'alphasort' : undeclared identifier error C2601: 'find' : local function definitions are illegal These are the 3 errors I'm getting. |
add it to the references in an option somewhere in MSVC++ then it shoud be fine.
|
Can't find "References" anywhere, found a place where you can set the directories of include-files
But nothing else. |
I put the dirent.h-file in the same directory as all my other header-files (iostream etc) that MSVC had made itself... Still doesn't work... Still get these errors:
error C2065: 'scandir' : undeclared identifier error C2065: 'alphasort' : undeclared identifier error C2601: 'find' : local function definitions are illegal P.S. I also got a .lib file when I downloaded the .h file... I have no clue what to do with lib files. I just put it with the .h file. |
Ah... just drag the lib (library) file into the project viewer. It should show up under all the folders. While the header file contains all the info about the functions you're using, the library file contains the functions themselves.
|
Hehe.. Project Viewer? Is that the editting window or the one to the left where all the files are seen?
|
Tried to drag it to the left window where all the files are seen... All that happened was that alot of numbers and letters showed up in the right window...
oO... I'm puzzled. |
That's odd. Try dragging it onto the project name. Sorry for not being clear earlier. Alternatively, you can edit the linker directives to include it, though that's a lot more difficult.
|
Nothing... All that comes up is a hex-list like:
0000010 21 3C ... . . . .. <some form of semi-understandable coding text> 0000020 . . . ... . . . <ditto> 00000... ................. <dittotwo> 00000... ................. <...> 00000a0 .................. 00000b0 ................ That's how it looks. |
Managed to add it to the Source Files/Header Files by using 'Add files to folder' ... But doesn't work in either folder... btw, where should "dirent.h" be? With MSVC++'s other include files (iostream etc) or in my projects folder, and should it be included with < .... > or " .... " ?
|
| All times are GMT -5. The time now is 6:21 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC