[GRASSLIST:9283] Re: undefined reference to `Vect_new_line_struct' [solved]

Dylan Beaudette dylan.beaudette at gmail.com
Sat Dec 3 22:09:39 EST 2005


Opps, sorry for the dumb post.

I was missing the Vect libs in the Makefile.

Dylan

On Friday 02 December 2005 05:19 pm, Dylan Beaudette wrote:
> Greetings,
>
> Another question about the GRASS C API:
> i am trying to use the some vector line data types and associated
> functions. however the compiler keeps generating the following errors:
>
> In function `main':
> main.c:(.text+0x37c): undefined reference to `Vect_new_line_struct'
> main.c:(.text+0x386): undefined reference to `Vect_reset_line'
> main.c:(.text+0x3c3): undefined reference to `Vect_append_point'
> main.c:(.text+0x3f2): undefined reference to `Vect_append_point'
> main.c:(.text+0x424): undefined reference to `Vect_append_point'
> main.c:(.text+0x44a): undefined reference to `Vect_append_point'
>
> In my main.c I have included everything that I could find related to vector
> functions:
>
> includes;
> #include <stdlib.h>
> #include <string.h>
> #include <math.h>
> #include <unistd.h>
> #include "gis.h"
> #include "Vect.h"
> #include "glocale.h"
> #include "dbmi.h"
> #include "display.h"
> #include "raster.h"
> #include "symbol.h"
> #include "colors.h"
>
>
> here is the actual code
>
> code:
> ----------------------snip-----------------
> 	Points = Vect_new_line_struct();
> 	Vect_reset_line ( Points );
> 	Vect_append_point ( Points, (x+dx)+10, (y+dy)+10, 0);
> 	Vect_append_point ( Points, (x+dx)-10, (y+dy)+10, 0);
> 	Vect_append_point ( Points, (x+dx)-10, (y+dy)-10, 0);
> 	Vect_append_point ( Points, (x+dx)+10, (y+dy)-10, 0);
> --------------------------------------------
>
>
> any ideas on why this might be happening?
>
> Thanks in advance,

-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341




More information about the grass-user mailing list