www.robkerr.com
www.robkerr.com

mobile development, cloud computing and building great software

Rob Kerr
Author

Addicted to coding since writing my first programs for the Commodore computers in the 1980s. Currently working as an independent contractor focused on native iOS development.

Share


Tags


Twitter


www.robkerr.com

Resolving OpenSSL link error building Swift Perfect project in XCode 8

Rob KerrRob Kerr

I've been getting the hang of the Perfect (one of the frameworks for developing web/REST services using Apple’s open source Swift programming language).

I found that at command-line everything in my "hello world" program compiled and linked, and my localhost web service started and ran almost immediately with no issues.

However, when I generated the project into an XCode project to edit and build in the IDE environment, I encountered this error on link:

ld: library not found for -lCOpenSSL for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've seen these kinds of errors before, and they're usually path issues. Sure enough I found the solution after a quick search:

Add the following path to the Library Search Path in XCode:

"$(PROJECT_DIR)/**" 

This seems likely a glitch in the routine that generates the .xcodeproj file, and hopefully will be resolved...but for now it's not a terrible workaround.

For reference, this is the spot to update:

xcode project library path

After updating the path, the project built and ran, and the HTTP service was running on the correct port as expected.

Perfect Running

Rob Kerr
Author

Rob Kerr

Addicted to coding since writing my first programs for the Commodore computers in the 1980s. Currently working as an independent contractor focused on native iOS development.

Comments