kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #01916
Re: adding support for MS visual C++ 2005
--- In kicad-devel@xxxxxxxxxxxxxxx, "eadthemm" <padamsn@...> wrote:
>
> I am currently makeing modifications to bring my copy of code to be
> compatable with visual c++ 2005.
>
> the prob i have is round is used everywhere and is posix only.
>
>
> my oringal solution
>
> #ifdef _MSC_VER//add support for round under visual C++ 2005 express
> #ifndef _MSC_VER_FIX_
> double round(double x){return(floor(x+0.5));}
> float round(float x){return(floor(x+0.5));}
> long double round(long double x){return(floor(x+0.5));}
> #define _MSC_VER_FIX_
> #endif
> #endif
>
> placed in fctsys.h because it was a high lvl header and coverd
> everythign that had used round
>
> but this didnt agree with the linker not a prob i have had before on
> other projects.
>
> so adding the above code block to each file using round works but is
> a bit nasty as thers multiple copys of it now.
>
> is there another header file that would be better.
> would it be better to simply change round to floor(x+0.5)
> i went to using this method now
>
> my thougts are of possably commiting the changes and a build guide for
> visual c++ one day so i am asking what would be the best accepted
> practice for this with this project.
>
> current progress log so far
http://final.servegame.com/kicad.changelog.log
>
I've been through this a while ago (couple of years back) and I wrote
the whole sequence down, so maybe this can help?
http://www.gevawebsolutions.com/wiki/index.php?title=KiCad_-_Compiling_and_debugging
Best rgds,
--Geert
References