title: Can't compile C++ plug-ins with OSX Lion?
body: <p>I have been writing a plug-in for Maya with C++. The <code>Makefile</code> I use works fine on Snow Leopard, but does not in Lion. I am using the latest version of Maya 2012 in both cases. Here's the top of the error stack:</p>
  
  <pre><code>/Applications/Autodesk/maya2012/Maya.app/Contents/../../devkit/include/maya/OpenMayaMac.h:89:35: error: 
      AvailabilityMacros.h: No such file or directory
  /Applications/Autodesk/maya2012/Maya.app/Contents/../../devkit/include/maya/OpenMayaMac.h:107:24: error: 
      sys/param.h: No such file or directory
  /Applications/Autodesk/maya2012/Maya.app/Contents/../../devkit/include/maya/OpenMayaMac.h:114:40: error: 
      CoreServices/CoreServices.h: No such file or directory
  </code></pre>
  
  <p>This makes me think that these files are in a different location in Lion, but I do see them all in my /usr/include/ directory, just like Snow Leopard. Anyone have similar issues, ideas, suggestions?</p>
  
  <p>The make file I use is below:</p>
  
  <pre><code># NOTE: MAYA_LOCATION on Mac OS X points to Maya.app/Contents
  MAYA_LOCATION = /Applications/Autodesk/maya2012/Maya.app/Contents
  
  # Change location if a non standard install.
  DEVKIT_LOCATION = $(MAYA_LOCATION)/../../devkit
  
  C++ =  g++
  
  PREFERRED_ARCHITECTURE =
  
  # Determine the architectures to build.
  MAYABIN = ${MAYA_LOCATION}/bin/maya
  MAYA_ARCHES = $(shell lipo -info $(MAYABIN) | sed 's/^.*://')
  
  ifneq ($(PREFERRED_ARCHITECTURE),)
      MAYA_ARCHES = $(filter $(PREFERRED_ARCHITECTURE),$(MAYA_ARCHES))
  
      ifeq ($(MAYA_ARCHES),)
          $(error $(MAYABIN) does not support the '$(PREFERRED_ARCHITECTURE)' architecture.)
      endif
  endif
  
  ARCH_FLAGS =    $(patsubst %,-arch %,$(MAYA_ARCHES))
  
  CFLAGS =    -DAW_NEW_IOSTREAMS -DCC_GNU_ -DOSMac_ -DOSMacOSX_ \
          -DOSMac_MachO_ -DREQUIRE_IOSTREAM -fno-gnu-keywords -fpascal-strings -O3 \
          $(ARCH_FLAGS) -D_LANGUAGE_C_PLUS_PLUS -isysroot /Developer/SDKs/MacOSX10.6.sdk \
          -include $(MAYA_LOCATION)/../../devkit/include/maya/OpenMayaMac.h \
          -shared
  
  C++FLAGS =  $(CFLAGS)
  
  INCLUDES =  -I. -I$(MAYA_LOCATION)/../../devkit/include
  
  LDFLAGS =   -framework Carbon -framework OpenGL -framework GLUT -lOpenMayaUI
  
  LD =        $(MAYA_LOCATION)/../../devkit/bin/mayald MAYA_ARCHES="$(MAYA_ARCHES)" MAYA_LOCATION="$(MAYA_LOCATION)"
  
  
  all: VmExample.bundle
  
  
  VmExampleNode.o: VmExampleNode.cpp 
      $(C++) -c VmExampleNode.cpp $(C++FLAGS) $(INCLUDES)
  
  vmPluginMain.o: vmPluginMain.cpp
      $(C++) -c vmPluginMain.cpp $(C++FLAGS) $(INCLUDES)
  
  VmExample.bundle: VmExampleNode.o vmPluginMain.o
  $(LD) -dynamic -bundle -o VmExample.bundle VmExampleNode.o vmPluginMain.o ../core/libVexample.o $(LDFLAGS)
  </code></pre>