How to install MySQL Connector/C on Mac OS X?

后端 未结 2 591
眼角桃花
眼角桃花 2020-12-16 21:33

I\'m writing an app in C that requires MySQL interaction, so I downloaded the Connector/C archive from the official website, and it contains bin, lib and include folders, bu

相关标签:
2条回答
  • 2020-12-16 21:49

    This is confusing, isn't it.. don't know why they don't make this more clear.

    The lib/ files go in /usr/local/lib The include/ files go in /usr/local/include The bin/ files go in /usr/local/bin

    The /usr/.. directory isn't visible through finder afaik so you have to go at it via commandline. Best of luck

    Also, in your Xcode project, make sure you add a Linked Library by going to your Target's settings, General, then adding Linked Library "libmysqlclient.dylib"

    0 讨论(0)
  • 2020-12-16 22:01

    Alternatively, to do everything on the commandline by "mv", you could also execute (on cmdline):

    defaults write com.apple.finder AppleShowAllFiles TRUE
    

    and

    killall Finder
    

    to make the hidden folder /usr (and everything else) visible.

    After placing your connector files (like Nektarios explicitly discribed where) and closing all "hidden folder - finder windows", execute on your cmd:

    defaults write com.apple.finder AppleShowAllFiles FALSE
    

    and again

    killall Finder
    

    to hide what have to be hidden.

    0 讨论(0)
提交回复
热议问题