Sqlite3 with Dev-C++

Asked

Viewed 105 times

0

I am trying to make a connection test with Dev-C++ and Sqlite3 but am having the following error:

  [Linker error] undefined reference to `sqlite3_open' 

I’ve already added:

#include <sqlite3.h>

I’ve already added all the details to the outfit

The test code is as follows::

// definindo ponteiros SQLite3
sqlite3_stmt *stmt;
sqlite3 *handle;
int res;
char *filename;

filename = "caixaeletronico.db";

res = sqlite3_open(filename, &handle); // Aqui gera o erro

If I comment the line above it compiles, ie it finds the includes normally, but I think it does not find the dll that is in the directory of Dev-C++ and in the directory of executable and windows to ensure. I don’t think I have to register the Sqlite dll is not?

  • The problem is in the linkage, not the build. You probably didn’t add the DLL to be linked to your program. Or added the wrong path, for example.

  • 5

    When you’re compiling, are you including the Sqllite library? Or are you compiling its source together? That’s probably it. I think it’s the same problem: http://answall.com/q/94743/101 see if it is and I answer or close as duplicate.

  • It’s the same question yes bigown.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.