MY SQL error while building
Ram-Muljani opened this issue · 3 comments
I am getting this error. I am using Mac OS with Kitura Studio. I am building from kitura studio. I tried everything to resolve this, Not sure what to do next. Please help
:1:10: note: in file included from :1:
#include "shim.h"
^
/Users/RamMuljani/Scade/mykituraapp/.build/checkouts/SwiftKueryMySQL.git--4551972435165752597/Sources/CMySQL/shim.h:3:10: error: 'mysql.h' file not found
#include <mysql.h>
^
/Users/RamMuljani/Scade/mykituraapp/.build/checkouts/SwiftKueryMySQL.git--4551972435165752597/Sources/SwiftKueryMySQL/MySQLConnection.swift:21:8: error: could not build C module 'CMySQL'
import CMySQL
^
:1:10: note: in file included from :1:
#include "shim.h"
^
/Users/RamMuljani/Scade/mykituraapp/.build/checkouts/SwiftKueryMySQL.git--4551972435165752597/Sources/CMySQL/shim.h:3:10: error: 'mysql.h' file not found
#include <mysql.h>
^
/Users/RamMuljani/Scade/mykituraapp/.build/checkouts/SwiftKueryMySQL.git--4551972435165752597/Sources/SwiftKueryMySQL/MySQLConnection.swift:21:8: error: could not build C module 'CMySQL'
import CMySQL
^
:1:10: note: in file included from :1:
#include "shim.h"
^
/Users/RamMuljani/Scade/mykituraapp/.build/checkouts/SwiftKueryMySQL.git--4551972435165752597/Sources/CMySQL/shim.h:3:10: error: 'mysql.h' file not found
#include <mysql.h>
^
/Users/RamMuljani/Scade/mykituraapp/.build/checkouts/SwiftKueryMySQL.git--4551972435165752597/Sources/SwiftKueryMySQL/MySQLConnection.swift:21:8: error: could not build C module 'CMySQL'
import CMySQL
^
error: terminated(1): /usr/bin/swift-build-tool -f /Users/RamMuljani/Scade/mykituraapp/.build/debug.yaml main -v output:
I don't know wha Kitura Studio is. But provided you have the mysqlclient libraries installed and your project includes the right path settings pointing to it, it should compile fine.
Check where are the mysql libraries installed in your Mac and then make sure you update the settings of your xcode project appropriately.
For example, in my case, I have the following setting:
HEADER_SEARCH_PATHS=/usr/local/mysql/include
LIBRARY_SEARCH_PATHS=/usr/local/mysql/lib
Kitura Studio is am IDE designed by Scade team specifically for Kitura framework.
I will migrate my project to xcode and check again once. Thanks
I just migrated my code to xcode and it works fine. Thanks a lot