bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test program compiling


From: Damien Genet
Subject: Re: test program compiling
Date: Thu, 12 Oct 2000 09:55:56 +0200

Salut,

Stephane BRANGER wrote:
> Hi !
>
> I'm a newcomer to parted, and I tried to compile tha small program in API
file:
>
> #include "/usr/local/include/parted/parted.h"
> int main()
> {
>  //ped_exception_set_handler(exception_handler);
>  ped_init();
>  ped_done();
>  return 0;
> }
>
> I try to compile then with:
>
> gcc test.c -o test
>
> and get the following error message:
>
> /tmp/cc2vu9sM.o: In function `main':
> /tmp/cc2vu9sM.o(.text+0x7): undefined reference to `ped_init'
> /tmp/cc2vu9sM.o(.text+0xc): undefined reference to `ped_done'
> collect2: ld returned 1 exit status
>
> So what did I do wrong ???

you did not link the program with libparted,
you must do :
gcc test.c -o test -lparted


MeUh
Dam




reply via email to

[Prev in Thread] Current Thread [Next in Thread]