On 29 January 2010 17:09, Alberto Roman Linacero <[email protected]> wrote: > Dear all, > > I'm using libgda4.0.6 in debian lenny 64 bits and I'm having some strange > behaviour. The code compiles fine but there are some problems: > > I'm getting the "assignment makes pointer from integer without a cast" warning > when I try to do: > > GdaSqlParser *parser = gda_sql_parser_new (); > > So I tried this: > parser = (GdaSqlParser *) gda_sql_parser_new (); > > But then it shows the warning: "cast to pointer from integer of different > size" > > This warning doesn't appears when I do: > parser = gda_connection_create_parser (conn); > or > parser = (GdaSqlParser *) gda_connection_create_parser (conn);
You need to include another header: #include <libgda/sql-parser/gda-sql-parser.h> see http://library.gnome.org/devel/libgda/stable/GdaSqlParser.html > > So, when I do this later: > GdaStatement *stmt = gda_sql_parser_parse_string (parser, buffer, &remain, > &error__); > > It segfaults and gdb shows an assertion: > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 0x7f95b017a770 (LWP 29995)] > 0x00007f95afa3a36a in gda_connection_statement_execute_select (cnc=0x851380, > stmt=0x207784c0, params=0x0, error=0x7fff2f0a14b8) at gda-connection.c:1842 > 1842 g_return_val_if_fail (GDA_IS_STATEMENT (stmt), NULL); Can you post the actual lines of code which produce that result as it is otherwise very difficult to tell what's wrong. Regards, Vivien _______________________________________________ gnome-db-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-db-list
