# Undefined Symbol on macOS

___isOSVersionAtLeast is undefined. How I spent several days compiling curl and linking it.

I use Kotlin/Native to create a tiny command line utility for Windows, Linux, and macOS. I believe the best app is the app without dependencies, and thus without requirements and dependencies hassle. That is easier than baking os-specific packages or installers.

Curl is one of my dependencies for this project. So I compiled it to libcurl.a and lined to Kotlin/Native easily with a few lines of Gradle script.

It failed with something cryptic on my macOS 10.13.4 with Xcode 9.3.1.

Undefined symbols for architecture x86_64:
"___isOSVersionAtLeast", referenced from:
_singleipconnect in libcurl.a(libcurl_la-connect.o)
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
_darwinssl_version_from_curl in libcurl.a(libcurl_la-darwinssl.o)

I should have compiled the curl with 10.13 as min version for Mac. I did that by setting CFLAGS environment variable to -mmacosx-version-min=10.13 for ./configure and make commands.