Author Topic: General Compiling Question  (Read 3949 times)

Offline NorthPilot06

  • Single posting newcomer
  • *
  • Posts: 3
General Compiling Question
« on: May 16, 2008, 01:47:28 am »
Hey guys,

     I've never used an IDE before - I've always been more of a CLI guy.  Anyway, Code::Blocks really caught my eye and I'm trying to use it to compile a gstreamer application that I've made previously.  I'm trying to run the command:

Code
gcc -Wall $(pkg-config --cflags --libs gstreamer-0.10) main.c -o gstreamer

I've done some trial & error, and I've looked through the documentation to no avail.  I'm sure it's not difficult, but I would appreciate it if someone could inform me how to have Code::Blocks run that command when I click the 'build' button?  Thanks!

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: General Compiling Question
« Reply #1 on: May 16, 2008, 04:35:14 am »
Create a new project file (Empty is enough), add main.c to the project (I guess you have it already. If not, just create it), Project -> Build options... go to the Linker settings tab, in Other linker options add:

Code
`pkg-config --cflags --libs gstreamer-0.10`

click OK.

Now, if you really want the executable to be called gstreamer, just go to Project -> Properties. Go to the Build targets tab and there you will see the Output filename option.

That should be it.

You can see the command line it executes too. Just go to Settings -> Compiler and debugger..., search the Other settings tab (in Global compiler settings) and set Full command line for Compiler logging.