ravenspawn
Technical User
what might be wrong with this code:
#include <stdio.h>
#include "dirent.h"
#include <stdlib.h>
int main()
{
struct S_Dir* dirp;
struct dirent* direntp;
dirp = opendir( "C:/WINDOWS/Desktop/OATS_MONITOR/OATS/usr/home/clf" );
if( dirp != NULL ) {
for(; {
direntp = readdir( dirp);
if( direntp == NULL ) break;
printf( "%s\n", direntp->d_name );
}
closedir(dirp );
return 0;
} }
it comes up with an error-
directorything.obj : error LNK2001: unresolved external symbol "void __cdecl closedir(struct S_Dir *)" (?closedir@@YAXPAUS_Dir@@@Z)
#include <stdio.h>
#include "dirent.h"
#include <stdlib.h>
int main()
{
struct S_Dir* dirp;
struct dirent* direntp;
dirp = opendir( "C:/WINDOWS/Desktop/OATS_MONITOR/OATS/usr/home/clf" );
if( dirp != NULL ) {
for(; {
direntp = readdir( dirp);
if( direntp == NULL ) break;
printf( "%s\n", direntp->d_name );
}
closedir(dirp );
return 0;
} }
it comes up with an error-
directorything.obj : error LNK2001: unresolved external symbol "void __cdecl closedir(struct S_Dir *)" (?closedir@@YAXPAUS_Dir@@@Z)