[odb-users] Some other undefined symbols on x86_64

Adnan RIHAN axel50397 at gmail.com
Sun Sep 28 06:51:52 EDT 2014


Hello there !

I feel like not being capable of compiling correctly a simple code… I have compiled all odb related libs (odb compiler, libodb, libodb-sqlite, libodb-qt) with GCC 4.9, for 64bit (-m64), on OS X 10.10 (Yosemite developer preview, I know ugly but I’m considering downgrading to Mavericks).

I’m on my first app using ODB, and using an ORM, and I’m continuing having some undefined symbols:
> Undefined symbols for architecture x86_64:
>   "odb::access::object_traits_impl<Category, (odb::database_id)1>::query(odb::database&, odb::sqlite::query_base const&)", referenced from:
>       odb::result<Category> odb::database::query_<Category, (odb::database_id)5, (odb::class_kind)0>::call<odb::query<Category, odb::sqlite::query_base> >(odb::database&, odb::query<Category, odb::sqlite::query_base> const&) in WarehouseWidget.o
> ld: symbol(s) not found for architecture x86_64

With the following snippets
.pro file:
> INCLUDEPATH +=  /usr/local/include
> LIBS        +=  -L/usr/local/lib -lodb-qt -lodb-sqlite -lodb

Warehouse.hpp:
> # include   <odb/database.hxx>
> # include   <odb/sqlite/database.hxx>
> 
> # include   "Models/Category/CategoryTableModel.hpp"
> 
> class WarehouseWidget : public QWidget
> {
>     Q_OBJECT
>     private:
>         QScopedPointer<odb::database>   m_db;
> 
>     public:
>         WarehouseWidget(QWidget *parent = 0);
> }

Warehouse.cpp:
> #include "WarehouseWidget.hpp"
> 
> #include <odb/transaction.hxx>
> #include <odb/sqlite/database.hxx>
> 
> #include "Models/Category/Category.hpp"
> #include "Models/Category/Category-odb.hxx"
> 
> WarehouseWidget::WarehouseWidget(QWidget *parent) : QWidget(parent)
> {
>     try {
>         this->m_db.reset(new odb::sqlite::database("databaseName"));
>         odb::transaction        t(this->m_db->begin());
> 
>         odb::result<Category>   c(this->m_db->query<Category>());
>     } catch (const odb::exception &e) {
>         qDebug() << "ODB Exception:" << e.what();
>     }
> }

Any idea :/ ?
Thank you for your help.
--  
Cordialement, Adnan RIHAN.
Directeur-Gérant de Eolis-Software, société de services informatiques.  

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