I use link-time optimization (-flto
in g++
and ld
command lines) and some of my method declarations (in headers) are marked as extern inline
(and just inline
in .cpp
files). Compiling yields:
./Client/include/GVGLObjects.hpp:96:32: error: storage class specified for 'VertexBuffer'
EFAST VertexBuffer();
^
and a bunch of similar errors for other methods and functions. EFAST
means extern inline
.
Why is this happening with LTO enabled? If this isn't allowed, how do I separate declaration and definition with inline and LTO?