views:

24

answers:

1

Hello,

when including "sqlite3.c" into my project, I get lots of compiler errors:

error C2027: use of undefined type "_ht"    d:\...\sqlite3.c    line 19556
...
fatal error C1003: Errors in the program are too numerous to allow recovery. The compiler must terminate.

When inlcuding "sqlite3.c" into an empty test project, I have no problems. I already compared project settings and there are no big differences.
How can I troubleshoot this problem? Is there anyone who had the same issue?

Thanks,
mspoerr

+1  A: 

It looks like you're not including all its header files (or maybe you're trying to build C as C++). Don't Do That. Better yet, build it into a library (or use someone else's build) and just include the built version in your project.

Donal Fellows
yes, I included it in a C++ project. I an external lib the only solution for this? Thanks
mspoerr
It is recommended to use the amalgamation source code file: "sqlite3.c" in all projects (c and c++): http://www.sqlite.org/howtocompile.html
mspoerr
I now built a static lib and linked this lib to my application. It works now. Thanks for the hint.
mspoerr