Hey all, Using MSVC 6.0
I read that An unresolved external means that you have called a function or variable but that the function or variable is not defined in the code linked to the executable.
these are the errors.
error LNK2001: unresolved external symbol _closedir
error LNK2001: unresolved external symbol _readdir
error LNK2001: unresolved external symbol _opendir
Great, so that means that this function wont work.
void do_plist(CHAR_DATA *ch, char *argument)
{
DESCRIPTOR_DATA *d;
BUFFER *pbuf;
struct dirent *Dir;
DIR *Directory;
char FName[80];
char buf[MSL];
int nMatch, neat1;
char neat[MSL];
char neat2[MSL];
char neat3[MSL];
nMatch = 0;
pbuf = new_buf();
d = new_descriptor();
Directory = opendir( PLAYER_DIR );
Dir = readdir( Directory );
send_to_char("{C PLAYER BASE {x\n\r",ch);
send_to_char("{RName lvl Race Class {x\n\r",ch);
send_to_char("{R==============================================={x\n\r",ch);
while( Dir != NULL )
{
sprintf(FName, PLAYER_DIR "%s", Dir->d_name);
{
if (Dir->d_name[0] >= 'A' && Dir->d_name[0] <= 'Z')
{
nMatch++;
load_char_obj( d, Dir->d_name );
if ( d->character->level <= ML )
{
sprintf(neat, "%s", Dir->d_name);
neat1 = d->character->level;
sprintf(neat2,"%s", capitalize(race_table[d->character->race].name));
sprintf(neat3,"%s", capitalize(class_table[d->character->class].name));
sprintf(buf, "{B[{c%-12s{B][{c%-2d {B][{c%-10s {B][{c%-12s {B]{x\n\r",
neat, neat1, neat2, neat3);
add_buf(pbuf, buf);
}
}
}
Dir = readdir( Directory );
}
closedir( Directory );
page_to_char(buf_string(pbuf), ch);
free_buf(pbuf);
sprintf( buf, "\n\r{cPlayers found{C: {Y%d{x\n\r", nMatch );
send_to_char( buf, ch );
return;
}
Any suggestions?
|