ld:未找到架构 x86_64 (Xcode 4) // opengles.o 的符号

发布于 2024-12-13 18:29:59 字数 753 浏览 1 评论 0原文

我正在使用外部库制作 xcode 命令工具应用程序,但出现了一些错误。

我试图解决它们:

  • 使用不同的编译器构建
  • 删除 GLES 文件夹并再次添加它
  • 在 32 和 64 上构建

我是否缺少有关 opengles.cpp 的内容?

如果您知道下一步可以做什么,请说出来,您可以在下面找到有关该项目和错误的所有信息。如果您需要更多信息,我很乐意为您提供帮助。另外,如果您知道如何从 xcode 4 中编译的 opnni 获取 NiUsertracker 示例,这也会对解决此问题有很大帮助

错误:

在此处输入图像描述

问题可能与这些文件有关:

在此处输入图像描述

信息的项目设置(它是命令行工具而不是应用程序):

在此处输入图像描述

时输出的屏幕截图

构建在此处输入图像描述

构建设置

“进入图像描述在这里

I'm making an xcode command tool application with external libraries and got some errors.

what i tried to resovle them :

  • Build with different compiler
  • remove The GLES folder and add it again
  • Build it on 32 and 64

Am i missing something regarding the opengles.cpp ?

If you got any idea what can be done next please say so, below you can find all the info regarding the project and error. If you need more info i'm happy to assist you. Also if you know how to get the NiUsertracker sample from opnni compiled in xcode 4, it would also be a great help to solve this problem

The error :

enter image description here

The problem might have something to do with these files :

enter image description here

The info of the project setting (it's a command line tool not an app) :

enter image description here

Screenshot of the output when building

enter image description here

The build settings

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

西瑶 2024-12-20 18:29:59

通常当我收到此类错误时,是因为我忘记链接到库。您获得的文件夹仅包含标题;尝试找到OpenGL ES的框架。 (我觉得Xcode自带了GLES框架,你试试搜索一下。)

Usually when I get those kinds of errors, It's because I forgot to link with the library. The folder you got contains only headers; try to find the framework for OpenGL ES. (I think Xcode comes with a GLES framework, try searching.)

兲鉂ぱ嘚淚 2024-12-20 18:29:59

在终端 (Terminal.app) 中手动运行命令以准确找出问题所在:

[ 11:56 jon@hozbox ~ ]$ Ld /Users/olivierjanssens/Library/Developer/Xcode/DerivedData/scene-anlidnesspxdbhblrrwqfwybphqj/Build/Products/Debug/scene normal x86_64
[ 11:56 jon@hozbox ~ ]$ cd /Users/olivierjanssens/Documents/xcode/scene
[ 11:56 jon@hozbox ~ ]$ setenv MACOSX_DEPLOYMENT_TARGET 10.7
[ 11:56 jon@hozbox ~ ]$ /Developer/usr/bin/llvm-g++-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -L/Users/olivierjanssens/Library/Developer/Xcode/DerivedData/scene-anlidnesspxdbhblrrwqfwybphqj/Build/Products/Debug -L/Users/olivierjanssens/Documents/xcode/scene/Libs -F/Users/olivierjanssens/Library/Developer/Xcode/DerivedData/scene-anlidnesspxdbhblrrwqfwybphqj/Build/Products/Debug -filelist /Users/olivierjanssens/Library/Developer/Xcode/DerivedData/scene-anlidnesspxdbhblrrwqfwybphqj/Build/Intermediates/scene.build/Debug/scene.build/Objects-normal/x86_64/scene.LinkFileList -mmacosx-version-min=10.7 /usr/lib/libnimCodecs.dylib /usr/lib/libnimMockNodes.dylib /usr/lib/libnimRecorder.dylib /usr/lib/libOpenNI.dylib /usr/lib/libXnVFeatures.dylib /usr/lib/libXnVHandGenerator.dylib -framework GLUT -framework OpenGL /Users/olivierjanssens/Documents/xcode/scene/Libs/glut64.lib -o

运行最后一个命令 (/Developer/usr/bin/llvm-g++-4.2) 后,它将表明失败的原因。

如果 setenv MACOSX_DEPLOYMENT_TARGET 10.7 命令失败,请将 setenv 替换为 export,并在 10.7 之前添加 = 像这样:

[ 11:56 jon@hozbox ~ ]$ export MACOSX_DEPLOYMENT_TARGET="10.7"

您似乎缺少构建配置的设置。可能是应用程序名称 (MyApp.app)。检查以确保您没有丢失项目设置窗口中“信息”选项卡中的任何内容(只需单击左侧文件列表中的顶部项目)。

来自 llvm-gcc 手册页

-o filename 指定输出文件为filename。

Run the commands manually in a terminal (Terminal.app) to find out exactly what the problem is:

[ 11:56 jon@hozbox ~ ]$ Ld /Users/olivierjanssens/Library/Developer/Xcode/DerivedData/scene-anlidnesspxdbhblrrwqfwybphqj/Build/Products/Debug/scene normal x86_64
[ 11:56 jon@hozbox ~ ]$ cd /Users/olivierjanssens/Documents/xcode/scene
[ 11:56 jon@hozbox ~ ]$ setenv MACOSX_DEPLOYMENT_TARGET 10.7
[ 11:56 jon@hozbox ~ ]$ /Developer/usr/bin/llvm-g++-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -L/Users/olivierjanssens/Library/Developer/Xcode/DerivedData/scene-anlidnesspxdbhblrrwqfwybphqj/Build/Products/Debug -L/Users/olivierjanssens/Documents/xcode/scene/Libs -F/Users/olivierjanssens/Library/Developer/Xcode/DerivedData/scene-anlidnesspxdbhblrrwqfwybphqj/Build/Products/Debug -filelist /Users/olivierjanssens/Library/Developer/Xcode/DerivedData/scene-anlidnesspxdbhblrrwqfwybphqj/Build/Intermediates/scene.build/Debug/scene.build/Objects-normal/x86_64/scene.LinkFileList -mmacosx-version-min=10.7 /usr/lib/libnimCodecs.dylib /usr/lib/libnimMockNodes.dylib /usr/lib/libnimRecorder.dylib /usr/lib/libOpenNI.dylib /usr/lib/libXnVFeatures.dylib /usr/lib/libXnVHandGenerator.dylib -framework GLUT -framework OpenGL /Users/olivierjanssens/Documents/xcode/scene/Libs/glut64.lib -o

After running the last command (/Developer/usr/bin/llvm-g++-4.2), it will show the reason for failing.

If the setenv MACOSX_DEPLOYMENT_TARGET 10.7 command fails, replace setenv with export and put an = before the 10.7 like this:

[ 11:56 jon@hozbox ~ ]$ export MACOSX_DEPLOYMENT_TARGET="10.7"

It seems like your missing a setting for your build configuration. Possibly the app name (MyApp.app). Check to make sure your not missing anything from the "Info" tab in the project settings window (just click the top item from the list of files on the left).

From llvm-gcc man page:

-o filename Specify the output file to be filename.

冬天旳寂寞 2024-12-20 18:29:59

删除框架。然后再次添加。退出 Xcode 并重新启动它。

remove the framework.And add it again.Quit the Xcode and relaunch it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文