Linker error building Adobe DNG SDK on MacOS 11

Community Beginner ,
Feb 16, 2022 Feb 16, 2022

Copy link to clipboard

Copied

Firstly, I know this is not strictly Acrobat SDK related, but I could not find a more relevant forum to post this on. I am working on a project that uses Adobe's DNG SDK 1.6 library, and it is supposed to work on Windows and MacOS.

 

The library has instructions on how to build it for both platforms, but I had to figure out an error that came up on Windows with Visual Studio. I am not very experienced with big C++ projects so it was not trivial but I got it working. Most of my own code will be done in C# .Net Core, calling the native libraries using a wrapper class with P/Invoke.

 

Now for Mac that's a different story, I have a MacOS 11 VM, installed Xcode 12.5.1 and followed the steps provided, as expected, it does not work. Bare in mind this is my first time touching Xcode and MacOS.

 

The project I am trying to build is dng_validate, and it depends on two libraries built by these projects: XMPFiles64 and XMPCore64.

 

The library projects build without any hiccups, each one of them creating a ".a" file in the folder: dng_sdk_1_6/xmp/toolkit/public/libraries/macintosh/intel_64_libcpp/Debug, they are named libXMPFilesStaticDebug.a and libXMPCoreStaticDebug.a respectively.

When I try to build the dng_validate project, I get the following error:

 

Library not found for -lXMPFilesStaticDebug

 

Because of the the error starting with an "l" instead of "lib", under both libraries project settings, I changed the "Executable Prefix" setting to "l" instead of "lib". Rebuilt both of them and made sure the file names changed as expected. But the error persists when trying to build the main project.

 

Under dng_validate's project settings, there is a setting called "Library Search Paths" and it does point to the proper aforementioned folder using a relative path. I even changed it to an absolute path to see if that would make it work.

 

I am really lost here, does anyone have an idea of what might be causing it?

TOPICS
Mac

Views

40

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Feb 16, 2022 Feb 16, 2022
Well... After asking on other forums and almost hiring a freelancer to fix this for me, I tried another shot in the dark of renaming the library files and it worked. I changed the extensions of  libXMPFilesStaticDebug.a and libXMPCoreStaticDebug.a from ".a" to ".dylib" and it just compiled and blew my mind with it.

Likes

Translate

Translate
LEGEND ,
Feb 16, 2022 Feb 16, 2022

Copy link to clipboard

Copied

You won't reach anyone here. May I suggest the Camera Raw forum? Except for Acrobat, Adobe combined the developer and end user forums (no idea who thought that was a good idea).

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 16, 2022 Feb 16, 2022

Copy link to clipboard

Copied

By the way, -l<libraryname> is the command line option for referencing a library <libraryname>, which might be lib<libraryname>.so or other things according to the platform.   

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 16, 2022 Feb 16, 2022

Copy link to clipboard

Copied

Oh thank you! I will try there too then.

 

about the -l<libraryname>, I was suspicious of that too. Specially because on the XCode project there are two arguments under "Other Linker Flags" named -lXMPFilesStaticDebug and -lXMPCoreStaticDebug

Perhaps thats the one it is complaining about not finding? The arguments' meaing themselves and not the actual files.

 

I just tested removing those arguments and I get a bunch of underfined symbols... Is there a way for me to know where the linker is searching for the file and the specific filename?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 16, 2022 Feb 16, 2022

Copy link to clipboard

Copied

LATEST

Well... After asking on other forums and almost hiring a freelancer to fix this for me, I tried another shot in the dark of renaming the library files and it worked.

 

I changed the extensions of  libXMPFilesStaticDebug.a and libXMPCoreStaticDebug.a from ".a" to ".dylib" and it just compiled and blew my mind with it.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines