2

我是创建 Maya 应用程序的新手,我正在尝试使用粒子系统,但是每当我尝试在我的 Mac 上编译代码时,我都会收到以下错误。

/Applications/Autodesk/maya2011/Maya.app/Contents/../../devkit/bin/mayald MAYA_ARCHES=" i386 x86_64 " MAYA_LOCATION="/Applications/Autodesk/maya2011/Maya.app/Contents" -o test test.o
Undefined symbols for architecture x86_64:
"MFnParticleSystem::~MFnParticleSystem()", referenced from:
  _main in test.o
"MFnParticleSystem::MFnParticleSystem()", referenced from:
  _main in test.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
Undefined symbols for architecture i386:
"MFnParticleSystem::~MFnParticleSystem()", referenced from:
  _main in test.o
"MFnParticleSystem::MFnParticleSystem()", referenced from:
  _main in test.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/zz/zzzivhrRnAmviuee+++G0k++2Ug/-Tmp-//cc9f4J54.out (No such file or directory)
make: *** [test] Error 1

这是文件中的代码

#include <MFnParticleSystem.h>
int main(int, char**)
{
    MFnParticleSystem fn;
}

我在 SnowLeopard 上运行 Maya2011。

我完全不知道为什么这不会编译。

4

2 回答 2

0

您是否按照Autodesk 联机帮助中的说明进行操作?

尝试查看提供的独立应用程序的 Makefile 以查看其中是否有任何链接到粒子库/框架,然后mayald从那里复制适当的选项。

于 2011-06-13T22:45:44.763 回答
0

您可能不会在项目中包含 Maya 框架,以便将其与可执行文件链接。您可以通过将 OpenMaya 库添加到项目来解决此问题。(我不确定您是否也不需要其他库)。无论如何,请查看您有权访问的 Maya API 文档。

于 2011-06-13T22:38:41.490 回答