Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linker errors #23

Open
mister-drgn opened this issue Jul 4, 2024 · 1 comment
Open

Linker errors #23

mister-drgn opened this issue Jul 4, 2024 · 1 comment

Comments

@mister-drgn
Copy link

mister-drgn commented Jul 4, 2024

Hi, I appreciate that you're providing this. I wonder if you have any documentation on resolving "Undefined symbol" linker errors, for those of using running on MacOS but using a package.swift file. Someone initially helped me out by suggesting using the following in my package file:

linkerSettings: [
.linkedFramework("Accelerate", .when(platforms: [.macOS])),
.linkedFramework("OpenCL", .when(platforms: [.macOS]))
]

This worked great until I tried to use the VideoCapture constructor, at which point I got 50 more "Undefined symbol" errors. I was able to resolve some of these by linking two additional frameworks, AVFoundation and CoreMedia. The final 21 errors all relate to "ob", for example ob::VideoFrame::width(). The same person who had helped me suggested these symbols are defined in the OrbbecSDK library. However, so far I have been unable to find a way to include that library in my package.swift file, even after downloading its latest release onto my machine.

Do you have ideas about this? Any help would be appreciated. Thanks.

@Lxrd-AJ
Copy link

Lxrd-AJ commented Aug 2, 2024

My recommendation might be to create a new Xcode project and install opencv-spm as a dependency there.

If it builds fine with no linker errors, then most likely it could be an issue with the Xcode project and it's settings.

I think these kind of linker errors usually pop up for projects created using Xcode 13/14 and are being built in Xcode 15/16-beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants