Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

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

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

1342204216
Explorer Explorer
201 Views
0 Replies
Message 1 of 1

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

1342204216
Explorer
Explorer

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

0 Likes
202 Views
0 Replies
Replies (0)