Reply to Message

View discussion in a popup

Replying to:
1342204216
68 Views, 0 Replies

Why OpenMaya API above version 2020 wrote this line: #if defined(__linux__) && __GNUC__ >= 9

for example in "MDrawContext.h":

#if defined(__linux__) && __GNUC__ >= 8
	friend class MDrawContext;
#endif

This will cause compilation error in linux under gcc < 9, like this:

‘Autodesk::Maya::OpenMaya20220000::MHWRender::MPassContext::~MPassContext()’ is private within this context
 class OPENMAYARENDER_EXPORT MDrawContext : public MFrameContext
                             ^~~~~~~~~~~~

I wander why this predefined line shows up in high versions of maya, and how could i compile this under linux gcc 8.5.

Now my solution is to directly modify these header files changing 9 to 8

Tags (2)
Labels (2)