delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/06/01/10:16:51

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Date: Tue, 1 Jun 1999 20:08:08 +0530 (IST)
From: "Raju K. V." <rajukv AT wipinfo DOT soft DOT net>
X-Sender: rajukv AT tagore
To: cygwin AT sourceware DOT cygnus DOT com
Subject: link error
Message-ID: <Pine.SV4.3.93.990601195835.29727A-100000@tagore>
MIME-Version: 1.0

hi,

I was trying to compile an application called linuxtree (available from
filewatcher.org). Compilation went thru but I got the following error
message during linking:

 gcc -s -o lxt main.o gui.o data.o uid.o view.o commands.o readln.o
config.o -lncurses
data.o(.text+0xc5e):data.c: undefined reference to `alphasort'
data.o(.text+0xc88):data.c: undefined reference to `scandir'
collect2: ld returned 1 exit status
make: *** [lxt] Error 1             

In which library is alphasort and scandir defined?
The context of use is 

void data_restatdir(int node) {
  int curnode,prevnode,tnode,newnode,patiencedelay;
  struct dirent **dirlist;
  int dirp,numdir;
  struct dirent *ent;
  struct stat tmpstat;
#ifdef DEBUG
    fprintf(debug,"\ndata_restatdir called: <%s>\n",data_fullname(node));
    fflush(debug);
#endif
  if(!data_isdir(node)) {
    crapout("restating nondir");
    /*data_restatfilenode(node);*/
    /*return;*/
  }
  if(!data_downdir(node)) {
    data_logdir(node);
    return;
  }
#ifdef DEBUG
  else fprintf(debug,"restating dir: <%s>\n",data_fullname(node));
  fflush(debug);
#endif

  gui_startpatience("restating...");

  /* first add new files to list */

  numdir=scandir(data_fullname(node),&dirlist,0,alphasort);
  if(numdir==-1) {
    data_restatdir(data_updir(node));
    return;
  }
  dirp=0;
  tnode=data_downdir(node);
  curnode=tnode;
.
.
.
.


Thanks in advance,
Raju


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019