0

I have trouble with including mysql.h file into my C project on Xcode, I am not so good on C. Seems like I do not have this file on my computer. Could someone share the solution for this?

  • 1
    If it's not present, you'll need to install it. If it is present you'll need to ensure it's in your include path. – tadman Dec 13 '18 at 19:20
  • tadman that's the problem, I don't know how to install it – Khojiakbar Shamsutdinov Dec 14 '18 at 20:45
  • [Homebrew](https://brew.sh) installs the headers by default, so that's one way: `brew install mysql`. – tadman Dec 14 '18 at 21:08
  • @tadman I did that but, Xcode can not see that, because it is located in MAMP/libraries/include. If I put the full address like MAMP/libraries/include/mysql.h the code gives me some errors like this: Undefined symbols for architecture x86_64: "_mysql_close", referenced from: _main in main.o – Khojiakbar Shamsutdinov Dec 15 '18 at 10:12
  • I mean directly with Homebrew and not with MAMP, but in any case if you know where the libraries are you can [alter the include path](https://stackoverflow.com/questions/14134064/how-to-set-include-path-in-xcode-project) in your project. – tadman Dec 17 '18 at 16:44

0 Answers0