2

I'm kind of new to c/c++ within Eclipse, trying to program some sqlite routines for MATLAB, using the sqlite amalgamation.

I'm having the issue, that eclipse seems to be missing something around the basic sqlite3 type. I'm getting 'invalid arguments' errors on all functions taking a sqlite3* as input.

E.g. on sqlite3_close I'm getting

Invalid arguments
Candidates are: int sqlite3_close(*)

while the proper prototype is

int sqlite3_close(sqlite3*)

The same issue occurs with all sqlite3_stmt types. I've included sqlite3.h, it's in the same directory and, last but not least, the code compiles and runs just fine.

What am I missing here?

sebastian
  • 9,526
  • 26
  • 54

1 Answers1

0

From the sqlite3 code, line 12450

** The "sqlite3_stmt" structure pointer that is returned by sqlite3_prepare()
** is really a pointer to an instance of this structure.


 struct Vdbe {
    /*struct definition*/
}

That is, sqlite3_stmt is a forward declaration that prevents the user to create a sqlite3_stmt structure but by using the sqlite3 functions.

In order to have Eclipse CDT recognize sqlite3_stmt you could add it as a symbol in your Eclipse project properties if you're not using it to compile.

Since I'm not, what I have is define sqlite3_stmt as Vdbe.

Community
  • 1
  • 1
JACH
  • 996
  • 11
  • 20