News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Cross-platform projects and targets

Started by Commodore64, July 11, 2006, 12:57:36 PM

Previous topic - Next topic

Commodore64

Hi,

I'm currently writing a cross-platform application with C::B SVN HEAD; I would like to manage it with only one C::B project with many targets. Some targets make sense only in one OS (for example, a target using Visual C++ makes sense only in Windows), other targets can be used in both Linux and Windows.

The problem is that Code::Blocks doesn't recognize compilers used in some targets (in Linux, it doesn't recognize Visual C++) and it messes up those target in the project file (it reverts them to use the standard compiler, i.e. GCC).

Am I missing something? Is there a way to avoid this problem?
Thanks,
Luca

mandrav

Unfortunately, currently there's no way to avoid this.
Be patient!
This bug will be fixed soon...

Commodore64

Well, I think I'll open a feature request  :wink:
Thank you!
Luca

Game_Ender

Quote from: mandrav on July 11, 2006, 01:30:12 PM
Unfortunately, currently there's no way to avoid this.

I hate to argue with the guy who made the IDE, but cant you accomplish this with scripts?  You can attach a script to the target and script can check platform and then adjust project options accordingly.  From a very quick look at the script interface this seems possible.

On another note, it doesn't seem to hard to be able to add a platform options to each target.  Something like "compile under", and then a wxChoice box with Linux, Windows, All (and soon Mac).

MortenMacFly

Quote from: Game_Ender on July 11, 2006, 03:56:09 PM
I hate to argue with the guy who made the IDE, but cant you accomplish this with scripts?
Good one! This should in fact be possible.
mandrav: Another PRO for scripting... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

mandrav

Quote from: Game_Ender on July 11, 2006, 03:56:09 PM
Quote from: mandrav on July 11, 2006, 01:30:12 PM
Unfortunately, currently there's no way to avoid this.

I hate to argue with the guy who made the IDE, but cant you accomplish this with scripts?  You can attach a script to the target and script can check platform and then adjust project options accordingly.  From a very quick look at the script interface this seems possible.

On another note, it doesn't seem to hard to be able to add a platform options to each target.  Something like "compile under", and then a wxChoice box with Linux, Windows, All (and soon Mac).

Heh, yes it is possible this way. I was just referring to the GUI.
You know I 'm always pro-scripting ;)

Here's a read for the OP: http://wiki.codeblocks.org/index.php?title=Build_scripts
Be patient!
This bug will be fixed soon...

Commodore64

The point is that C::B should be told not to touch the settings of a target if the compiler of that target does not exist in the current C::B profile.