User forums > Help

bugs and a compiler problem

(1/3) > >>

Eric Burnett:
Hey, great IDE you've got here. I was using Dev-C++, and someone reccomended this one. I'm likin' it so far! Especially switching between compilers. Which, oddly enough, is where my problem comes in.

When I make a new, empty project (or any other type I think), and go to compile, I get "Command execution failed...". When I go to Settings > Configure Plugins > Compiler, I can see it is set how I want it to be. But when I right click on the project and hit "Build options", I find it is way different. For one, Console Application and default have different compilers, which is causing that problem. And neither has the options I set for the plugin :roll:. I figure either I don't understand at all what is happening, or there is a bug. At the moment it is no biggie, I know how to get around it, but it means I have to setup the compiler anew every time I make a project, and redo the options to boot. It is a bizzare error, because for things like the 'other' options (like compiler logging style), it accepts what the plugin is set for.

Also, in that same build options area, if I check some compiler options and then switch compilers, they are put into the "More options" area instead of just removed. I have to clear that manually or it causes a compiler error.

And the auto-indent seems to be functioning oddly...it keeps the indent from the previous line, but when I make a brace or anything, it does not tab in when I hit enter. Shouldn't it?

Thats all I've got for the moment, but I'll be sure to let you know if I find any more. Thanks for the good prog, and keep up the good work!

BTW, I am using VC++ Toolkit 2003 as default (trying to ;)), on Windows XP Pro. Beta 5 at the moment.

Eric Burnett:
Oh, and one other thing. If you try to debug when there isn't a debugger setup, it thinks it is debugging, and you can't tell it to stop. This means you have to close the program to try again. Not really a big deal since I don't have a debugger ;), but may as well mention it.

mandrav:
The multiple-compiler-setup feature is not designed to let you switch compiler on-the-fly for your project and adjust all your settings accordingly. There 's a good reason for this behaviour. The compiler plugin is pretty configurable. It even let's you configure an unsupported compiler (even more so in the next release). It couldn't possibly know all the compiler options of every existing compiler so to switch between them and substitute their options accordingly!
The only solution to this problem would be to allow different settings for different compilers for each project. This might get implemented in the future, but no automatic option conversion. That is just not possible...

You can work around it, though. Create different targets per-compiler in your project.
Or create different projects per-compiler (that's the approach I usually take). Since the workspace allows for multiple open projects, I see no downside to this ;)


--- Quote ---When I make a new, empty project (or any other type I think), and go to compile, I get "Command execution failed...".
--- End quote ---

Although you seem to understand the problem here, let me give you a hint which will benefit others who read this post. When you see a "Command execution failed..." message in the compiler log, switch to the "Code::Blocks Debug" log. There you can see the exact command that failed. This might give you a clue. Usually, though, this happens when an unconfigured or badly configured compiler is used.


--- Quote ---For one, Console Application and default have different compilers, which is causing that problem.
--- End quote ---

I dont't really understand this, but I guess you are talking for the default compiler settings when you create a new project from a template.
The supplied templates contain settings for the GCC compiler only. They 're being updated now and the next release should behave correctly for this matter.
As a workaround (gee! codeblocks has got workarounds for everything! ;) ) after you configure your new project for the compiler you 're using, click on "Project/Save project as user-template". This will save your project as a template. Next time you 'll want to start a similar project, when you click on "Project/New", switch to the "User-templates" tab and select your project.


--- Quote ---Also, in that same build options area, if I check some compiler options and then switch compilers, they are put into the "More options" area instead of just removed. I have to clear that manually or it causes a compiler error.
--- End quote ---

As said before, that is automatic option conversion between different compilers. Not supported as explained...


--- Quote ---And the auto-indent seems to be functioning oddly...it keeps the indent from the previous line, but when I make a brace or anything, it does not tab in when I hit enter. Shouldn't it?
--- End quote ---

No, it is designed that way. There are far too many different coding styles to support and make everybody happy. And because I 've seen flame wars for exactly this topic, basic indentation support is provided only. At least for now ;)

Cheers,
Yiannis.

mike:

--- Quote ---but no automatic option conversion
--- End quote ---


Of course, it is possible - one just needs to define the interface for Compiler plugins to say: "This option = this flag" and "Only-this-compiler-opiont = this flag". Non-trivial, I guess, but possible :-)

mandrav:
But not all compilers support the same options...
Except for the basic ones (debugging info, optimization, some C++ features) there are huge differences.

What do you prefer? Full or crippled support for a feature???
That's what I mean by saying "it's not possible". Full support is not possible. Crippled support is never good. Hidden bugs, people not understanding why it works for some things and not for others, etc...

Yiannis.

Navigation

[0] Message Index

[#] Next page

Go to full version