kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #01912
Re: adding support for MS visual C++ 2005
-
To:
<kicad-devel@xxxxxxxxxxxxxxx>
-
From:
"Carl Rash" <daystar@...>
-
Date:
Tue, 28 Oct 2008 17:03:54 -0400
-
In-reply-to:
<4906BFDA.2030408@...>
There are many reasons why one may want to use a Microsoft compiler on a windows operating system. The primary reason is the quality of the binarycode and the superior debugging tools that are available. Jean Pierre you may remember with I found a stack corruption bug caused by an array allocation error as a local variable using the Microsoft debug code. You fixed theproblem when I informed you. This is onlyone of several bugs identified inthat release by the MS debugger/
I have the complete make files for building version 2007-11-29-RC2 on anyversion of MSVC post 2004 .net if any one is interested. I stopped portingto MS when Kicads direction seemed to be taken over by those who literallydespise the word WIndows or Microsoft.
I would be glad to share what I have, just let me know.
Carl Rash
----- Original Message -----
From: jean-pierre.charras@...
To: kicad-devel@xxxxxxxxxxxxxxx
Sent: Tuesday, October 28, 2008 3:31 AM
Subject: Re: [kicad-devel] 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
------=_NextPart_000_0063_01C9391F.2C8A99A0 Content-Type: text/html;
charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.6001.18148" name=GENERATOR></HEAD>
<BODY style="BACKGROUND-COLOR: #ffffff" bgColor=#ffffff>
<DIV><FONT face=Arial size=2> There are many reasons why one
may want to use a Microsoft compiler on a windows operating system. The primary
reason is the quality of the binary code and the superior debugging tools that
are available. Jean Pierre you may remember with I found a stack corruptionbug
caused by an array allocation error as a local variable using the Microsoft
debug code. You fixed the problem when I informed you. This is onlyone of
several bugs identified in that release by the MS debugger/</FONT></DIV>
<DIV><FONT face=Arial size=2> I have the complete make files for building
version 2007-11-29-RC2 on any version of MSVC post 2004 .net if any
one is interested. I stopped porting to MS when Kicads direction seemed to be
taken over by those who literally despise the word WIndows or
Microsoft.</FONT></DIV>
<DIV><FONT face=Arial size=2>I would be glad to share what I have, justlet me
know. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Carl Rash</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=jean-pierre.charras@...
href="mailto:jean-pierre.charras@...">jean-pierre.charras@...</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=kicad-devel@xxxxxxxxxxxxxxx
href="mailto:kicad-devel@xxxxxxxxxxxxxxx">kicad-devel@xxxxxxxxxxxxxxx</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, October 28, 2008 3:31
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [kicad-devel] adding support
for MS visual C++ 2005</DIV>
<DIV><BR></DIV>
<DIV id=ygrp-text>
<P>kajdas a écrit :<BR>><BR>> As far as I know, this project does not
support commercial compilers <BR>> and it is strongly against using them.
This is not in line with <BR>> open-source and free-software
ideology.<BR>><BR>Just, we cannot support all the existing compilers
(support kicad if <BR>already a big work).<BR>A big advantage of gcc if it
exists on **ALL** platforms.<BR>(Of course, it is also free,<BR>and usingonly
free, open source under GPL sofware (including Kicad) <BR>means all guys can
download and use it without license problem).<BR>And we cannot test
compilation with others compilers<BR>(and therefore test if binaries haveno
bug or problem.)<BR><BR>> If you want to document compiling with one of
those compilers, that is <BR>> probably fine.<BR>> You may want to
search previous threads regarding this subject.<BR>> Martin<BR>><BR>>
---- eadthemm <padamsn@gmail. com
<mailto:padamsn%<WBR>40gmail.com><WBR>> wrote:<BR>> > I am
currently makeing modifications to bring my copy of code to be<BR>> >
compatable with visual c++ 2005.<BR>> ><BR>> > the prob i have is
round is used everywhere and is posix only.<BR>> ><BR>> ><BR>>
> my oringal solution<BR>> ><BR>> > #ifdef _MSC_VER//add
support for round under visual C++ 2005 express<BR>> > #ifndef
_MSC_VER_FIX_<BR>> > double round(double x){return(floor(
x+0.5));}<BR>> > float round(float x){return(floor( x+0.5));}<BR>>
> long double round(long double x){return(floor( x+0.5));}<BR>> >
#define _MSC_VER_FIX_<BR>> > #endif<BR>> > #endif<BR>>
><BR>> > placed in fctsys.h because it was a high lvl header and
coverd<BR>> > everythign that had used round<BR>> ><BR>> >
but this didnt agree with the linker not a prob i have had before on<BR>>
> other projects.<BR>> ><BR>><BR>You can test this:<BR>in
common.h<BR>#ifdef _MSC_VER//add support for round under visual C++ 2005
express<BR>double round(double x);<BR>> #endif<BR><BR>in
common.cpp<BR>#ifdef _MSC_VER//add support for round under visual C++ 2005
express<BR>double round(double x){return(floor( x+0.5));}<BR>#endif<BR><BR>by
the way, note round and atan2 uses only double as arguments<BR>><BR>>
> so adding the above code block to each file using round works but
is<BR>> > a bit nasty as thers multiple copys of it now.<BR>>
><BR>> > is there another header file that would be better.<BR>>
> would it be better to simply change round to floor(x+0.5)<BR>> > i
went to using this method now<BR>> ><BR>> > my thougts are of
possably commiting the changes and a build guide for<BR>> > visual c++
one day so i am asking what would be the best accepted<BR>> > practice
for this with this project.<BR>> ><BR>> > current progress log so
far <A href="http://final.">http://final.</A> servegame. com/kicad. <BR>>
changelog. log <<A
href="http://final.servegame.com/kicad.changelog.log">http://final.<WBR>servegame.<WBR>com/kicad.<WBR>changelog.<WBR>log</A>><BR>>
><BR>><BR><BR>-- <BR>Jean-Pierre CHARRAS<BR><BR>Maître de
conférences<BR>Directeur d'études 2ieme année.<BR>Génie Electrique et
Informatique Industrielle 2<BR>Institut Universitaire de Technologie 1 de
Grenoble<BR>BP 67, 38402 St Martin d'Heres Cedex<BR><BR>Recherche
:<BR>GIPSA-LIS - INPG<BR>Rue de la Houille Blanche<BR>38400 Saint Martin
d'Heres<BR><BR></P></DIV><!--End group email --></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0063_01C9391F.2C8A99A0--
Follow ups
References