[odb-users] Simple libodb-sqlite test

Adnan RIHAN axel50397 at gmail.com
Sun Mar 15 11:05:55 EDT 2015


Hi there,

Still on ODB homebrew packages, I’m making simple tests, but I’m not able to compile any of the “odb-example”s, plus I’m not even able to compile the simplest test I’ve made for libodb-sqlite:  

> #include  
> #include  
> #include  
> #include  
> #include  
>  
> int main (int argc, char* argv[])
> {
> std::auto_ptr db(new odb::sqlite::database(
> std::string("test.sqlite"), SQLITE_OPEN_READWRITE
> ));
>  
> return 0;
> }

Here is how I compile it:  
> clang++ test.cpp -lodb-sqlite -lodb

Here is the error:  
> Undefined symbols for architecture x86_64:
> "odb::sqlite::database::database(std::__1::basic_string, std::__1::allocator > const&, int, bool, std::__1::basic_string, std::__1::allocator > const&, odb::details::transfer_ptr)", referenced from:
> _main in test-0f6c5b.o
> ld: symbol(s) not found for architecture x86_64

I’ve also tried to compile the cpp file THEN link it, I’ve also tried to add “-L” and “-I”, the error is still the same.

I don’t get it, because I’m on my cash register app since few month and it uses libodb-sqlite, it correctly compiled (using clang, libs compiled with clang). Any idea?

Thank you !
--
Cordialement, Adnan RIHAN.

GPG : 5675-62BA (https://keybase.io/max13/key.asc )
-> Si vous n'utilisez pas GPG mais souhaitez quand même m’envoyer un e-mail chiffré : (https://encrypt.to/0x567562BA ).



More information about the odb-users mailing list