Project : Console application
Compiler : GNU GCC Compiler (called directly)
Directory : D:\Programming\test5\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.cpp
Execution of 'mingw32-g++.exe -c main.cpp -o .objs\main.o' in 'D:\Programming\test5' failed.
The problem is that the templates are created for GCC. You must make your changes (ie. use MSVC compiler setting) and create your own template (menu Project->Save project as user-template).There was sometime ago a discussion about project templates and compilers (see http://forums.codeblocks.org/index.php?topic=1183.0). Is the compiler plugin revamping post-1.0 the proposed solution for this "problem"?
This is a known limitation of the templates system and will be addresed in compiler plugin revamping post-1.0 .
Well, it's one of the solutions, because you'll have in only one template, all the compilers supported.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).
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.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).
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).
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...).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).
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.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.
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?
Another option is to have in New from template dialog a Compiler option, just below Category.But if I want to chose a template not supported for the selected compiler?
And showing the templates according to each compiler.
You'll choose the compiler that you think it's most simmilar.It could be a solution. But IMHO it would be good to make this as a selectable option for "advanced user". For "normal user" it would be better to propose templates filtered by supported compilers. If then a user would like to use a not supported template, she/he could activate the option and then chose the most similar compiler template.
eg. you want a OpenWatcom QT project.
You think GCC is perhaps simmilar to OpenWatcom (rather than MSVC).
Then you choose the GCC QT template, and in the template, you change the according things to make it work on OpenWatcom.
You save the project as a template, and if you want, submit it to SF tracker so others can use it.
That is more or less what you'll do anyways with the other option (having a messagebox telling its not supported...).
Only that now you'll have the option to choose the most simmilar compiler template (or whatever you want).
It might be a good idea to put the option to hide incompatible templates in the dialog itself though, so you don't have to close it, go to the settings, enable the option, and go back to the dialog.Yes, exactly what I have in mind :).
Either a checkbox "Only show templates that support $DEFAULT_COMPILER / the default compiler", or a "Settings..." button (if there are more settings for the dialog).
If the option to select a compiler is added to the dialog as Takeshi Miya suggested, the checkbox text can be shortened to "Only show compatible templates" or some such.