Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

khanakia/mysql-connector-cpp-macos

Repository files navigation

How to connect to Mysql using C++ in Mac Osx

There are 2 ways of doing that first using mysql.h file or using mysql connector

Using Mysql.h

You can check demo1.cpp file which is using mysql.h STEPS ARE:

By Default g++ uses clang compiler which comes with Xcode which is not a genuine compiler so you need to reinstall to have genuine compiler for g++ You can check version with g++ --version

  1. Install macports using brew
  2. sudo port selfupdate
  3. sudo port install gcc46
  4. sudo port select --set gcc mp-gcc46
  5. Now check again gcc --version it should Say (gcc (MacPorts gcc46 4.6.4_11) 4.6.4) ...

..................

Read full article here https://medium.com/@khanakia/how-to-connect-to-mysql-using-c-in-mac-osx-17e1ada42ccd

About

Connecting Mysql with C++ Connector in MacOSx

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /