Add MSVC builtin macros to setuphelpers

Milian Wolff mail at milianw.de
Fri Dec 6 11:58:35 UTC 2013


On Friday 06 December 2013 15:36:11 Vlas Puhov wrote:
> Hi!
> 
> That's great news!!!
> 
>    The only thing I don't understand is: why are those macros enabled only
> if _MSC_VER is defined??? What about winebuild/mingw compilers? They let
> you build windows apps even on Linux machine. So I can build .exe files
> very easily, but kdevelop complains that __stdcall is not defined :( That's
> really
> disappointing...

For now this is done in order to not pollute the default (i.e. working on code 
for current toolchain). These defines could easily lead to inconsistencies 
imo, so I'm reluctant to add them everywhere.

>    So, wouldn't it be better if those macros could be configured at run-time
> instead of compile-time?  E.g. through some configuration page where you
> could choose appropriate compiler? Or shouldn't they be defined globally
> for all compilers?

This would need a general deep refactoring of the code. We need something like 
that anways, e.g. to allow different compilers to be used for some projects. 
This is not only valid for Windows, but also for any other cross compiling 
setups.

I'd welcome help in that regard. A first start would be to generalize the 
define and include path configuration pages we have in the custom-build-system 
right now. They could (and should) be made available to all project managers, 
similar to the project filter. Then people could add custom defines there as 
needed and/or eventually define a custom compiler there to be used for a 
project.

Bye
-- 
Milian Wolff
mail at milianw.de
http://milianw.de


More information about the KDevelop-devel mailing list