将MFnParticleSystem添加到代码中时,Maya应用程序代码将不会编译
Maya application code will not compile when MFnParticleSystem is added to code
我是创建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;
}
我在2011年5月2日的SnowLeopard上跑步。
我完全不明白为什么这不会编译。
您可能没有在项目中包含Maya框架,因此它与可执行文件链接。可以通过将OpenMaya库添加到项目中来修复此问题。(我不确定你是否也不需要其他图书馆)。在任何情况下,请查看您可以访问的Maya API文档。
您是否遵循了autodesk联机帮助中的说明?
尝试查看所提供的独立应用程序的Makefile,看看其中是否有链接到粒子库/框架,然后从那里将适当的选项复制到mayald
。
相关文章:
- 我可以在 iOS 或 mac 应用程序中使用C++代码吗?
- 从运行服务的应用程序代码中提取窗口句柄
- 使用本机 C++ 应用程序中的 C# 代码
- 使用代码在 AWS 开发工具包C++控制台应用程序上设置凭证
- 使用全局 IP 地址时,C++ winsock 2 应用程序中的代码是否必须更改?
- 我在哪里编写在退出 C++ 窗口窗体应用程序之前执行的代码部分
- 为什么在Visual Studio中用c ++编写GUI应用程序的代码与控制台应用程序的代码不同?
- 剥离C++库中的应用程序不需要的代码
- OpenGL 应用程序退出,退出代码为 -1073741515 (0xC0000135)
- DoModal 主应用程序随机返回 -1 代码
- 使用 IPC 共享内存的应用程序是否可以访问彼此的代码?
- 使用 MATLAB 编码器将代码从注册估算器应用程序导出到C++
- 如何隐藏嵌入在 c++ 应用程序中的 python 代码
- 将32位和64位应用程序(具有相同代码)编译为一个EXE
- 是否有一种简单的方法可以从普通的 win32 C++代码向应用程序见解提供数据?
- 在计算机级别,应用程序以二进制方式运行,然后当发生运行时错误时,它如何呈现回错误代码
- 将C 代码编译到独立应用程序.App
- 如何在导致应用程序崩溃的代码中修复指令
- 如何将我在VC++9中开发的带有CLR支持静态库的C++/CLI(托管)链接到我在VC++6.0中的本机代码(应用程序)
- 调试混合代码应用程序中的启动问题