Code::Blocks Forums

User forums => Help => Topic started by: EnterA on March 02, 2013, 01:02:19 pm

Title: New with code::blocks, need some help with compiler settings.
Post by: EnterA on March 02, 2013, 01:02:19 pm
Hi, I'm a student learning C, and our course is using code::blocks.
They told us to install the "course wizard" - which adds the course name to the list of new projects. every home exercise we have - we need to make a new project and choose the symbol of our course. and then submit the .c file via the webcourse. also they WARREND us that if we don't use these way to submit our hw - it may result in decrease of home exercise grade.

the problem is that it's annoying to open everytime a new project, with all it's files etc.. my qst is how can I open just a new file - ".c" but with the same properties of compiler/debugging/warnings the course stuff added in the project build.. so that every time I open new file it will function the same as their project and will alert the same compile errors. hope you understood my qst. 10x a lot.

if it helps I added link to their wizard:
http://webcourse.cs.technion.ac.il/234114/Winter2012-2013/ho/WCFiles/Codeblocks-wizard-Windows.exe
Title: Re: New with code::blocks, need some help with compiler settings.
Post by: Pecan on March 02, 2013, 01:16:43 pm
Open/create a new project with the basic configuration that you'd like.
Then:
main menu->File->Save Project as template

Then open the saved template for each new project and adjust the project configuration from there.
Title: Re: New with code::blocks, need some help with compiler settings.
Post by: EnterA on March 02, 2013, 01:18:27 pm
but I don't want to open new project. I want just to open new .c file with their compiler properties.
Title: Re: New with code::blocks, need some help with compiler settings.
Post by: Pecan on March 02, 2013, 01:23:46 pm
In CodeBlocks, compiler properties are saved in the project settings.
So you will have to create a project or template.
Title: Re: New with code::blocks, need some help with compiler settings.
Post by: Jenna on March 02, 2013, 01:27:09 pm
If you compile a single file the settings for the global settings of the default compiler are used if I remember correctly.

So set up the default compiler with all your settings and try if it works.

Be aware that settings you make in the global compiler section ("Settings -> Compiler") will normally also be used for projects that use this compiler, so you will most likely run into trouble sooner or later.
Title: Re: New with code::blocks, need some help with compiler settings.
Post by: EnterA on March 02, 2013, 01:28:41 pm
mm why I can't go to setting>compiler and debugger and change there the properies as the the properties they changed in the build options of their project? or is there more things I need to change?

Edit: 10x jens!
"Be aware that settings you make in the global compiler section ("Settings -> Compiler") will normally also be used for projects that use this compiler, so you will most likely run into trouble sooner or later."
what do you mean by saying this? what projects? you mean built-in projects?
Title: Re: New with code::blocks, need some help with compiler settings.
Post by: Jenna on March 02, 2013, 01:39:52 pm
mm why I can't go to setting>compiler and debugger and change there the properies as the the properties they changed in the build options of their project? or is there more things I need to change?

Edit: 10x jens!
"Be aware that settings you make in the global compiler section ("Settings -> Compiler") will normally also be used for projects that use this compiler, so you will most likely run into trouble sooner or later."
what do you mean by saying this? what projects? you mean built-in projects?
Any projects that use the compiler.

Normally the wizard created projects use the default compiler, if you don't want the settings you have to change it for each project you will create later.

And if you need to create real programs (with more than one source-file) you will need to use projects.
Title: Re: New with code::blocks, need some help with compiler settings.
Post by: EnterA on March 02, 2013, 01:46:05 pm
mm why I can't go to setting>compiler and debugger and change there the properies as the the properties they changed in the build options of their project? or is there more things I need to change?

Edit: 10x jens!
"Be aware that settings you make in the global compiler section ("Settings -> Compiler") will normally also be used for projects that use this compiler, so you will most likely run into trouble sooner or later."
what do you mean by saying this? what projects? you mean built-in projects?
Any projects that use the compiler.

Normally the wizard created projects use the default compiler, if you don't want the settings you have to change it for each project you will create later.

And if you need to create real programs (with more than one source-file) you will need to use projects.

The thing is that I use code::blocks only for home exercise and I don't need more than 1 file each time. I only submit 1 ".c" file each time. Does your warning still valid for me? thanks again.
Title: Re: New with code::blocks, need some help with compiler settings.
Post by: stahta01 on March 02, 2013, 07:52:19 pm
mm why I can't go to setting>compiler and debugger and change there the properies as the the properties they changed in the build options of their project? or is there more things I need to change?

Edit: 10x jens!
"Be aware that settings you make in the global compiler section ("Settings -> Compiler") will normally also be used for projects that use this compiler, so you will most likely run into trouble sooner or later."
what do you mean by saying this? what projects? you mean built-in projects?
Any projects that use the compiler.

Normally the wizard created projects use the default compiler, if you don't want the settings you have to change it for each project you will create later.

And if you need to create real programs (with more than one source-file) you will need to use projects.

The thing is that I use code::blocks only for home exercise and I don't need more than 1 file each time. I only submit 1 ".c" file each time. Does your warning still valid for me? thanks again.

Yes, that warning is VALID for everybody that uses Code::Blocks!

Tim S.