[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[altq:1826] Re: Problems compiling source files using libaltq
You need to copy and link altqd/libaltq2.c into your program.
This file is a legacy glue for RSVP support.
-Kenjiro
Tiago Fioreze wrote:
> I'm having problems with the compilation of programs using the libaltq
> library.
> I have the following scenario:
> - /usr/local/lib/ (the directory where libaltq.a is located)
> - /usr/include/libaltq and /usr/include/altq (the directories where
> header files are located)
> I did a simple program (your name is altq_api.c) to test the AltQ's API.
>
> #include <string.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <altq/altq.h>
> #include <altq/altq_priq.h>
> #include <libaltq/altq_qop.h>
>
> int main(int argc, char **argv)
> {
> qcmd_init();
> return 0;
> }
>
> I run the command 'gcc -g altq_api.c -o altq_api -L /usr/local/lib -laltq',
> and I got a lot of lines of errors.
>
> "/usr/local/lib/libaltq.a(qop.o): In function `qcmd_init':
> /root/altq/altq-3.1/libaltq/qop.c:116: undefined reference to `log_write'
> /usr/local/lib/libaltq.a(qop.o): In function `qcmd_enable':
> /root/altq/altq-3.1/libaltq/qop.c:153: undefined reference to `log_write'
> /root/altq/altq-3.1/libaltq/qop.c:154: undefined reference to `log_write'
> /usr/local/lib/libaltq.a(qop.o): In function `qcmd_disable':
> /root/altq/altq-3.1/libaltq/qop.c:153: undefined reference to `log_write'
> /usr/local/lib/libaltq.a(qop.o): In function `qcmd_enableall':
> /root/altq/altq-3.1/libaltq/qop.c(.text+0x201): undefined reference to
> `log_write'"
> And the errors continue....
>
> Could somebody help me with this problem?
>
> Thanks in advance,
>
> Tiago Fioreze