User forums > Using Code::Blocks

General Compiling Question

(1/1)

NorthPilot06:
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
--- End code ---

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!

Ceniza:
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`
--- End code ---

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.

Navigation

[0] Message Index

Go to full version