← Back to team overview

kicad-developers team mailing list archive

Re: adding support for MS visual C++ 2005

 

kajdas a écrit :

As far as I know, this project does not support commercial compilers and it is strongly against using them. This is not in line with open-source and free-software ideology.

Just, we cannot support all the existing compilers (support kicad if already a big work).
A big advantage of gcc if it exists on **ALL** platforms.
(Of course, it is also free,
and using only free, open source under GPL sofware (including Kicad) means all guys can download and use it without license problem).
And we cannot test compilation with others compilers
(and therefore test if binaries have no bug or problem.)

If you want to document compiling with one of those compilers, that is probably fine.
You may want to search previous threads regarding this subject.
Martin

---- eadthemm <padamsn@gmail. com <mailto:padamsn%40gmail.com>> 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.
>

You can test this:
in common.h
#ifdef _MSC_VER//add support for round under visual C++ 2005 express
double round(double x);
#endif

in common.cpp
#ifdef _MSC_VER//add support for round under visual C++ 2005 express
double round(double x){return(floor( x+0.5));}
#endif

by the way, note round and atan2 uses only double as arguments

> 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 <http://final.servegame.com/kicad.changelog.log>
>


--
Jean-Pierre CHARRAS

Maître de conférences
Directeur d'études 2ieme année.
Génie Electrique et Informatique Industrielle 2
Institut Universitaire de Technologie 1 de Grenoble
BP 67, 38402 St Martin d'Heres Cedex

Recherche :
GIPSA-LIS - INPG
Rue de la Houille Blanche
38400 Saint Martin d'Heres







Follow ups

References