← Back to team overview

kicad-developers team mailing list archive

Re: adding support for MS visual C++ 2005


2008/10/28 eadthemm <padamsn@...>:
> 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

You are reinventing the wheel. Please read http://manveru.pl/node/3
and patches are published on kicad-devel files area on Yahoo Groups.

I have published links on wiki. Are they missing now?
jabber: manveru@...
gg: 1624001


Follow ups