Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: ordak on January 16, 2020, 03:37:31 pm

Title: Compiling GTK 2
Post by: ordak on January 16, 2020, 03:37:31 pm
Hi,

I am following this link for GTK 2 compiling (https://developer.gnome.org/gtk2/stable/gtk-compiling.html). In Code::Blocks where can I input these :

-L/usr/lib -L/usr/X11R6/lib
Title: Re: Compiling GTK 2
Post by: BlueHazzard on January 16, 2020, 03:51:08 pm
Project->Build options->Select your project name at the left->Search directories->Linker

Add your paths without the -L

Or you can put your options in
Project->Build options->Select your project name at the left->Linker settings->Other linker options
Title: Re: Compiling GTK 2
Post by: ordak on January 17, 2020, 01:51:02 pm
Project->Build options->Select your project name at the left->Search directories->Linker

Add your paths without the -L

Or you can put your options in
Project->Build options->Select your project name at the left->Linker settings->Other linker options

Is the global way ( for all projects) like this :

Setting menu / compiler... / select desired compiler /

Rest is as your post or not ?
Title: Re: Compiling GTK 2
Post by: BlueHazzard on January 18, 2020, 05:24:14 pm
Quote
Is the global way ( for all projects) like this :

Setting menu / compiler... / select desired compiler /
yes but:
It is generally not a good idea to modify the global flags. A better way is to create a template project and use this, or modify the wizard script for the default project (a bit advanced)

For creating a project template:
1) Create a new project and set all settings as you like
2) Save the project as template with File->Save project as template

now if you want to use this template
File->New-> project->User templates
Title: Re: Compiling GTK 2
Post by: ordak on January 19, 2020, 12:51:35 pm
Quote
Is the global way ( for all projects) like this :

Setting menu / compiler... / select desired compiler /
yes but:
It is generally not a good idea to modify the global flags. A better way is to create a template project and use this, or modify the wizard script for the default project (a bit advanced)


[...]

Actually in Global compiler setting I have different compiler setting in select compiler mode. GTK , warnings and more are configured there ,  I choose it for my temp projects.