Author Topic: Convert compile command to build options?  (Read 2261 times)

Offline Newbie0815

  • Multiple posting newcomer
  • *
  • Posts: 59
Convert compile command to build options?
« on: April 13, 2011, 12:54:19 pm »
Im frequently finding tutorials where they compile at the command line, i.e. for a simple MySQL connection, like here:

http://iitdu.forumsmotion.com/t1544-connect-with-mysql-using-c-in-ubuntu

gcc -o output-file $(mysql_config --cflags) input-file.c $(mysql_config --libs)

Id love to know, how to put those options into a C::B project under build options?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12062
    • Travis build status
Re: Convert compile command to build options?
« Reply #1 on: April 13, 2011, 12:57:17 pm »
Hm, pretty strange way to use backticks `` :)

To convert it to C::B
1. project -> build options -> compiler -> other -> `mysql_config --cflags`
2. project -> build options -> other -> `mysql_config --libs`

Also read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Newbie0815

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: Convert compile command to build options?
« Reply #2 on: April 13, 2011, 01:02:45 pm »
WOW, ultra fast, short and precise, thank you.