如何解决将MFnParticleSystem添加到代码中时,Maya应用程序代码将无法编译
|| 我是创建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
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上运行。
我完全坚持为什么它不能编译。
解决方法
您可能未在项目中包括Maya框架,因此该框架与可执行文件链接。您可以通过将OpenMaya库添加到项目中来解决此问题。 (我不确定您是否也不需要其他库)。无论如何,请查看您有权访问的Maya API文档。
, 您是否遵循了Autodesk联机帮助中的说明?
尝试查看提供的独立应用程序的Makefile,以查看它们是否链接到粒子库/框架,然后从此处将适当的选项复制到“ 2”。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。