[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

linkning mod library?



Hej,

Jeg sidder med et problem.
Jeg har netop installeret et sæt libraries kaldet BDM (Background Debug
Mode) til at debugge programmer kørende på et Motorola ColdFire
processor system over parallelporten. 

Anyways, nu er jeg så igang med at skrive et program, der skal benytte
dette lib (Nedenstående program stump er lånt fra en mailing-liste).
Source:
#include <BDMlib.h>

int main(void) 
{
  unsigned long addr;
  char buf[10];
  int i;
  
  bdmOpen("dev/bdmcf0");
  bdmReset();
  addr = 0x20000;
  bmdReadMemory(addr, buf, 4);
  for(i = 0; i < 4; i++) {
    printf("\n %2d= %2x", buf[i]);
  }
}

Dette prøver jeg så at kompilere:
sslug@sslug btech1]$ gcc -lBDM -o bdm-test bdm-test.c 
/tmp/ccNBx87p.o: In function `main':
/tmp/ccNBx87p.o(.text+0xc): undefined reference to `bdmOpen'
/tmp/ccNBx87p.o(.text+0x14): undefined reference to `bdmReset'
/tmp/ccNBx87p.o(.text+0x2a): undefined reference to `bmdReadMemory'
collect2: ld returned 1 exit status

Mit spørgsmål er:
Hvad går der galt? Hvorfor skriver ld undefined reference når bdm*
funktionerne er declared i BDMlib.h?

Mvh
//Brix
-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Name:   Henrik Brix Andersen         Web: http://freakfoster.dhis.org
 E-mail: sslug@sslug  Get Linux: http://www.linux.org
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *