shaka-project / shaka-player-embedded

Shaka Player in a C++ Framework
Apache License 2.0
238 stars 63 forks source link

Symbols not found for ShakaPlayerLicenseServerConfig and ShakaPlayerAdvancedDrmConfig #152

Closed OmarPedraza closed 4 years ago

OmarPedraza commented 4 years ago

Hi, We're trying to use ShakaPlayerLicenseServerConfig and ShakaPlayerAdvancedDrmConfig strings defined in ShakaPlayer.h for configuring our ShakaPlayer instance.

player.configure(ShakaPlayerLicenseServerConfig(Constants.Downloads.widevineServerName), with: server)
player.configure(ShakaPlayerAdvancedDrmConfig(Constants.Downloads.widevineServerName, "persistentStateRequired"), with: true)

Xcode is able to recognize them while writing the code but, when building or running, the following error is returned:

Undefined symbols for architecture arm64:
  "_ShakaPlayerAdvancedDrmConfig", referenced from:
      hayu.DownloadManager.startManager() -> () in DownloadManager.o
  "_ShakaPlayerLicenseServerConfig", referenced from:
      closure #1 (__C.AVURLAsset?, hayu.AlertError?) -> () in closure #1 () -> () in hayu.DownloadManager.download(element: hayu.PlayableElement, completion: (hayu.AlertError?) -> ()?) -> () in DownloadManager.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Nevertheless, the rest of properties and methods defined on ShakaPlayer.h work fine. Did we miss anything while building the framework?

itsmefreitas commented 4 years ago

I am on macOS Catalina and XCode 11.6, both in ObjC as well as Swift projects I also face the issue described above.

I am building against commit 8fb2f82 and using the produced frameworks (arm64 architecture) in my XCode project. This is currently not allowing me to configure drm settings on the player.

@TheModMaker XCode allows me to jump to the definition for ShakaPlayerLicenseServerConfig, yet the compiler is somehow not finding said symbol, are there any additional steps/checks I could perform in the project's build settings?