[odb-users] compiling under MinGW w/ CMake

Christian Sell christian at gsvitec.com
Mon Dec 15 12:56:31 EST 2014


Hello,

 

what a cocktail! MinGw 4.8 + Odb + CMake!

 

I have a simple project setup with the above ingredients. I am able to build
now (took me waaay too long), but as soon as I add a shared_ptr member
(along with the appropriate #include and using clause), I get a message

 

"shared_ptr does not name a type"

 

Not being lazy, I figure out the include path for MinGW (why the h*** isn't
it passed to the odb compiler automatically?) and pass it via -I to the odb
compiler. Now it gets interesting: 300 lines of obscure error messages, of
which I include just the first few:

 

In file included from
C:/MinGW/mingw32/lib/gcc/mingw32/4.8.1/include/c++/string:41:0,

                 from <standard-odb-prologue>:7:

C:/MinGW/mingw32/lib/gcc/mingw32/4.8.1/include/c++/bits/allocator.h:92:45:
error: expected template-name before '<' token

C:/MinGW/mingw32/lib/gcc/mingw32/4.8.1/include/c++/bits/allocator.h:92:45:
error: expected '{' before '<' token

C:/MinGW/mingw32/lib/gcc/mingw32/4.8.1/include/c++/bits/allocator.h:92:45:
error: expected unqualified-id before '<' token

In file included from
C:/MinGW/mingw32/lib/gcc/mingw32/4.8.1/include/c++/string:41:0,

                 from <standard-odb-prologue>:7:

 

can someone shed light on this?

 

Regards,

Chris



More information about the odb-users mailing list