[GRASS-dev] undefined reference to `db_set_connection'

Jarosław Jasiewicz jarekj at amu.edu.pl
Wed Nov 25 10:49:00 EST 2009


Hi
I try to write function which will create temporary table to store 
data.... (Grass65)

#include <grass/gis.h>
#include <grass/dbmi.h>
#include <grass/Vect.h>

....

int create_table (void)
{

    dbConnection conn;
    dbDriver *driver;
    dbHandle handle;
    dbString table_name, db_sql, val_string;
    char *cat_col_name;
    char buf[1000];
   
    /* string to db */
   
    db_get_connection(&conn);
    G_debug(1, "driver: %s", conn.driverName);
    G_debug(1, "database: %s", conn.databaseName);

}

during compilation I recive error:

undefined reference to `db_get_connection'

what is wrong?

BTW: I need table only but not vector file so I use this instead of 
Vect_default_field_info()

thanks for any help
Jarek


More information about the grass-dev mailing list