Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 1st, 2005, 12:52 PM   #1
Siphon
Newbie
 
Join Date: Feb 2005
Posts: 25
Rep Power: 0 Siphon is on a distinguished road
#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.

Last edited by Siphon; Feb 1st, 2005 at 12:54 PM.
Siphon is offline   Reply With Quote
Old Feb 2nd, 2005, 3:30 AM   #2
Berto
Programming Guru
 
Join Date: Aug 2004
Posts: 1,022
Rep Power: 12 Berto is on a distinguished road
Send a message via AIM to Berto Send a message via MSN to Berto
add it to the references in an option somewhere in MSVC++ then it shoud be fine.
Berto is offline   Reply With Quote
Old Feb 2nd, 2005, 4:09 AM   #3
Siphon
Newbie
 
Join Date: Feb 2005
Posts: 25
Rep Power: 0 Siphon is on a distinguished road
Can't find "References" anywhere, found a place where you can set the directories of include-files

But nothing else.
Siphon is offline   Reply With Quote
Old Feb 2nd, 2005, 4:13 AM   #4
Siphon
Newbie
 
Join Date: Feb 2005
Posts: 25
Rep Power: 0 Siphon is on a distinguished road
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.
Siphon is offline   Reply With Quote
Old Feb 2nd, 2005, 9:59 AM   #5
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,428
Rep Power: 15 Ooble is on a distinguished road
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.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Feb 2nd, 2005, 1:32 PM   #6
Siphon
Newbie
 
Join Date: Feb 2005
Posts: 25
Rep Power: 0 Siphon is on a distinguished road
Hehe.. Project Viewer? Is that the editting window or the one to the left where all the files are seen?
Siphon is offline   Reply With Quote
Old Feb 2nd, 2005, 2:19 PM   #7
Siphon
Newbie
 
Join Date: Feb 2005
Posts: 25
Rep Power: 0 Siphon is on a distinguished road
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.
Siphon is offline   Reply With Quote
Old Feb 2nd, 2005, 3:05 PM   #8
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,428
Rep Power: 15 Ooble is on a distinguished road
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.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Feb 2nd, 2005, 5:44 PM   #9
Siphon
Newbie
 
Join Date: Feb 2005
Posts: 25
Rep Power: 0 Siphon is on a distinguished road
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.
Siphon is offline   Reply With Quote
Old Feb 2nd, 2005, 5:47 PM   #10
Siphon
Newbie
 
Join Date: Feb 2005
Posts: 25
Rep Power: 0 Siphon is on a distinguished road
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 " .... " ?
Siphon is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:26 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC