User forums > Help
changing codeblocks compiler
takeshimiya:
Well, it's one of the solutions, because you'll have in only one template, all the compilers supported.
But a current solution (workaround) would be to have one template for each compiler supported by C::B. And then when you open the New Project dialog, the dialog would always choose the template according to the default compiler.
Michael:
--- Quote from: Takeshi Miya on December 12, 2005, 11:15:13 am ---Well, it's one of the solutions, because you'll have in only one template, all the compilers supported.
--- End quote ---
IMHO, this would be a rather good solution. May be it would be possible to simplify the template, by asking the user for information (to make it somehow interactive).
--- Quote from: Takeshi Miya on December 12, 2005, 11:15:13 am ---But a current solution (workaround) would be to have one template for each compiler supported by C::B. And then when you open the New Project dialog, the dialog would always choose the template according to the default compiler.
--- End quote ---
Yes, I think that at the beginning this could be a solution. But several templates to manage could become a problem (especially when their number will increase).
Michael
takeshimiya:
--- Quote from: Michael on December 12, 2005, 11:35:01 am ---Yes, I think that at the beginning this could be a solution. But several templates to manage could become a problem (especially when their number will increase).
--- End quote ---
Well, not a problem, but rather the person who creates the template, will need to create and test each template with every compiler.
Which in fact, it is necessary because of the C::B nature of supporting more than 1 compiler.
Also remember that some libraries/templates will never be supported on every compiler, so the templates will not be available for all compilers sometimes.
So suppose the case when a person creates a template, he may create a Mingw32 and a MSVC version.
And then when a user tries to use that template, C::B will choose Mingw32 or MSVC according to the default compiler.
And in the case of the user is using another compiler (not supported by that template), a messagebox will appears saying that the template only supports the following compilers: Mingw32, MSVC.
Or, it could be moved right to the New Project dialog, so the user doesn't even see the templates don't supported for the default compiler.
What do you think?
Michael:
--- Quote from: Takeshi Miya on December 12, 2005, 11:46:23 am ---
--- Quote from: Michael on December 12, 2005, 11:35:01 am ---Yes, I think that at the beginning this could be a solution. But several templates to manage could become a problem (especially when their number will increase).
--- End quote ---
Well, not a problem, but rather the person who creates the template, will need to create and test each template with every compiler.
Which in fact, it is necessary because of the C::B nature of supporting more than 1 compiler.
Also remember that some libraries/templates will never be supported on every compiler, so the templates will not be available for all compilers sometimes.
--- End quote ---
Yes, you're right. But I think that it would be easier to have just a template containing all the info (e.g., supported compilers) rather than e.g., templateX_MSVC, templateX_minGW, templateX_SDCC. The problem here would be to correctly manage the templates. For example, if you modify the templateX structure, then you will have to do it for all the templateX (and it can be that you will forget one...).
--- Quote from: Takeshi Miya on December 12, 2005, 11:46:23 am ---So suppose the case when a person creates a template, he may create a Mingw32 and a MSVC version.
And then when a user tries to use that template, C::B will choose Mingw32 or MSVC according to the default compiler.
And in the case of the user is using another compiler (not supported by that template), a messagebox will appears saying that the template only supports the following compilers: Mingw32, MSVC.
Or, it could be moved right to the New Project dialog, so the user doesn't even see the templates don't supported for the default compiler.
What do you think?
--- End quote ---
IMHO, I would prefer the first proposition. I would prefer to see all the templates. If I chose one not supported a message box should let me know this, but also allow me to use it anyway (at my own risk :)). This for trying to make it works or for tesing it or studying it.
On the other side the second proposition would be most suitable for beginners or users preferring a simple, clear and easy interface. This would also avoid most of the posts like "This template does not work with compiler X".
May be the choice between the two alternatives could be let to the user (in the Settings menu).
Michael
takeshimiya:
Another option is to have in New from template dialog a Compiler option, just below Category.
And showing the templates according to each compiler, of course defaulting to the default compiler.
I think that is the most transparent to the user.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version