-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not compiling properly - help! #144
Comments
Exactly, you are right, you have to set this flag to ON to use an older SQLite3 library. Something like:
|
Ok, here is how I am building it now:
(By default, the However, I still got the same errors, so I added But now I get these linking errors:
Any ideas on what is going on? I know that the library is getting found, but the compiler just doesn't seem to link it properly. Could it have something to do with the order of my libraries? |
Fixed the issue! I needed to put -lSQLiteCpp as the left-most library. Dependent libraries need to go first. (see https://stackoverflow.com/a/409402) This is what it looks like now: Right now I'm specifying |
Thanks for the update! For the second point (in relation to #145 CMake flags not passed in), I should find a way to improve that! I am reopening the issue to track this. |
Well, I am closing after closer review, this since there is nothing I can do here: you need to use CMake all the way to define the variable only on CMake and everything works as expected. Your problem is you are not using CMake so you need to define every vars by yourself on your command line. |
Hello,
I can't seem to get sqlitecpp to work with my setup. Did I miss something obvious in my usage of sqlitecpp?
My usage:
My makefile downloads sqlitecpp, creates a build directory, cd's into it, runs
cmake ..
, runsmake
, and then copies the built sqlitecpp lib file and source header files to a local directory calledsqlitecpp
in my project. I then use those local files in my code like so:And I build my program like so:
but I get the following errors:
To me, it looks like there is some kind of contention with sqlite and sqlitecpp. Any ideas? I am using sqlitecpp 2.2.0 and sqlite3 v. 3.8.7.1. Any help is appreciated. Thanks!
I think this may have something to do with SQLITE_USE_LEGACY_STRUCT (see #131)
The text was updated successfully, but these errors were encountered: