[odb-users] #pragma view pointer() ignored on Windows

Adnan RIHAN axel50397 at gmail.com
Wed May 27 07:00:06 EDT 2015

Hi all !

I have finally finished a first version of my app, and it’s compiling/running very well.

I’m on OS X, and I’m trying to compile the app on Windows XP but there are some compilation errors regarding view pointers.

Here is how I call query_one<T>() (« T » being the raw class name):
> QSharedPointer<T>   r;
> r = this->m_db->query_one<T>(query);

erreur : no match for 'operator=' (operand types are 'QSharedPointer<offer_view>' and 'odb::object_traits<offer_view>::pointer_type {aka offer_view*}')
                 r = this->m_db->query_one<T>(query);

offer_view is defined as:
> struct offer_view
> {
>     OfferSP   o;
> };
> #   pragma  db  view(offer_view)            object(Offer) object(Product) object(product_barcode = barcode)   query(distinct)

No matter if I add « pointer(QSharedPointer) » or not, still the same error. No matter if I used the OS X-generated *-odb.*xx files on Windows or regenerate them. Plus, I’ve compared ODB generated files from OS X and Windows, they’re identical. Any idea?

- Yosemite (10.10.3)
- Qt 5.4.1 x64
- ODB 2.4.0 (from scratch) using gcc-4.9.2
- App compiled with clang

- XP SP3 (on VM)
- Qt 5.4.1 32bit
- ODB 2.4.0 (precompiled) using MingW 4.9.1
- App compiled with MinGW 4.9.1 (also tested on 4.8.1)

Thanks for your help.
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