Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: guillaumec on August 03, 2016, 04:02:25 pm
-
Hi,
I'm creating a software using Mysql.
I wrote the source, that's ok.
When I compile it, with gcc on console, like :"gcc -o NomExecutable $(mysql_config --cflags) main.c $(mysql_config --libs)" it works.
But if I try to compile directly in CodeBlocks, I've many errors...
So, I wish to know where, and how, in codeBlocks, declare the "$(mysql_config --cflags)" and $(mysql_config --libs)" to have a good compilation.
Because, I think if I change my ideas, thoses options will change, so if I know for them, for others I'll do to...
Thanks for help !
Guillaume C.
-
You have to quote that in the build options so that the command is actually run. You are trying to use it as a variable whcih will not work.
-
Hi,
I've quoted them, but i've always :"--cflags" no such file or directory.
So i'm asking where to put those both informations.
In Compiler settings, linker settings ??
Sorry, I'm a beginner with Code::blocks, and I'm coming from Windows, that is so different for compling (using C++ Builder).
Thanks for help.
-
I would try this.
In the "Compiler Settings" "Other compiler options" add
And, in "Linker Settings" "Other linker options" add
NOTE: Use of the slanted single quote!
Edit: I normally save the project and reopened it when doing these types of changes.
Some members of the C::B Dev Team says this is NOT needed; but, I seem to need it.
Tim S.
-
Hi,
sorry for the late answer, I wasn't at home past week.
Thanks for help, it's work !!!