[Top][All Lists]

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

Re: [libredwg] Undefined References

From: Dave Coventry
Subject: Re: [libredwg] Undefined References
Date: Mon, 10 Feb 2020 18:43:01 +0200

With regard to this, the libredwg library needs to be explicitly
compiled in by appending "-lredwg" onto the end of the command string.

gcc -Wall -g -pedantic -std=gnu99 dwgout.c -o dwgout -lredwg

Perhaps this should be incorporated into the README?

~ Dave

On Wed, Dec 18, 2019 at 8:04 PM Dave Coventry <address@hidden> wrote:
> I'm trying to write a small program to test libredwg, but am having
> difficulty in compiling my code.
> gcc -o dwgout dwgout.c
> which gives me a series of errors:
> /usr/bin/ld: /tmp/cc2cJQDl.o: in function `output_BLOCK_HEADER':
> dwgout.c:(.text+0x253): undefined reference to `get_first_owned_entity'
> /usr/bin/ld: dwgout.c:(.text+0x27b): undefined reference to
> `get_next_owned_entity'
> /usr/bin/ld: /tmp/cc2cJQDl.o: in function `output_SVG':
> dwgout.c:(.text+0x2cc): undefined reference to `dwg_model_x_max'
> /usr/bin/ld: dwgout.c:(.text+0x2e3): undefined reference to `dwg_model_x_min'
> /usr/bin/ld: dwgout.c:(.text+0x30a): undefined reference to `dwg_model_y_max'
> /usr/bin/ld: dwgout.c:(.text+0x321): undefined reference to `dwg_model_y_min'
> /usr/bin/ld: dwgout.c:(.text+0x438): undefined reference to `dwg_model_x_min'
> /usr/bin/ld: dwgout.c:(.text+0x453): undefined reference to `dwg_model_y_min'
> /usr/bin/ld: /tmp/cc2cJQDl.o: in function `main':
> dwgout.c:(.text+0x71f): undefined reference to `dwg_read_file'
> collect2: error: ld returned 1 exit status
> My program seems to see "dwg.h", but it doesn't seem to see "dwg.c".
> I'm not sure why this is.

reply via email to

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