Advertisements

On Tuesday 25 September 2012 12:21, in comp.lang.c,
wrote:
> On 2012-09-25 15:41:09 +0000, Eric Sosman said:
>
>> On 9/25/2012 10:21 AM, sim wrote:
>>>
>>>
>>> I have problems on all my C files where i declare:
>>>
>>> #include <mysql/mysql.h>
>>>
>>>
>>> The answer is everytime the same:
>>>
>>> no fileâ€¦or directory
>>
>> It appears the compiler doesn't know where to find the
>> #include'd files. There is probably a compiler option to
>> tell it where to look, something like
>>
>> gcc -I c:/mysql7.2/include ... yourfile.c ...
>>
>> The details will vary depending on exactly where the include
>> files are located.
>
> Hallo,
> I resolved by typing: #include "path/path/..."
>
> Now I have another problem, I am creating a Query to update datas into
> MySqlâ€¦I don't know how to put into Query the variablesâ€¦â€¦â€¦.

If it's on the OP's system mysql_config is a useful tool to help with
this. "mysql_config --include" or "mysql_config --cflags" will add the
correct path to his compiler command line. I don't know if mysql with
MingW would include it but ...

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!