Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22157

Pass mysql.h path to gcc compiler

$
0
0

I've created a database using mysql, and now i need to connect it with C, basically just to call some functions, already created in SQL.

I've installed the "C Connector" from mysql website. When i try to compile my program using gcc db.c i have this error:

db.c:2:19: fatal error: mysql.h: No such file or directory compilation terminated.

So, looking on the forum I understood that i need to include 'mysql.h' path when i compile my program, using -I, but it stills gives me an error.

The path where is mysql.h is the following:

C:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include

Any idea?


Viewing all articles
Browse latest Browse all 22157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>