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