← Back to team overview

kicad-developers team mailing list archive

Re: adding support for MS visual C++ 2005

 

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>&nbsp;&nbsp;&nbsp; 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>&nbsp; I have the complete make files for building 
version 2007-11-29-RC2 on any version of MSVC post&nbsp;2004 .net&nbsp;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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Carl Rash</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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>&gt;<BR>&gt; As far as I know, this project does not 
support commercial compilers <BR>&gt; and it is strongly against using them. 
This is not in line with <BR>&gt; open-source and free-software 
ideology.<BR>&gt;<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>&gt; If you want to document compiling with one of 
those compilers, that is <BR>&gt; probably fine.<BR>&gt; You may want to 
search previous threads regarding this subject.<BR>&gt; Martin<BR>&gt;<BR>&gt; 
---- eadthemm &lt;padamsn@gmail. com 
&lt;mailto:padamsn%<WBR>40gmail.com&gt;<WBR>&gt; wrote:<BR>&gt; &gt; I am 
currently makeing modifications to bring my copy of code to be<BR>&gt; &gt; 
compatable with visual c++ 2005.<BR>&gt; &gt;<BR>&gt; &gt; the prob i have is 
round is used everywhere and is posix only.<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; 
&gt; my oringal solution<BR>&gt; &gt;<BR>&gt; &gt; #ifdef _MSC_VER//add 
support for round under visual C++ 2005 express<BR>&gt; &gt; #ifndef 
_MSC_VER_FIX_<BR>&gt; &gt; double round(double x){return(floor( 
x+0.5));}<BR>&gt; &gt; float round(float x){return(floor( x+0.5));}<BR>&gt; 
&gt; long double round(long double x){return(floor( x+0.5));}<BR>&gt; &gt; 
#define _MSC_VER_FIX_<BR>&gt; &gt; #endif<BR>&gt; &gt; #endif<BR>&gt; 
&gt;<BR>&gt; &gt; placed in fctsys.h because it was a high lvl header and 
coverd<BR>&gt; &gt; everythign that had used round<BR>&gt; &gt;<BR>&gt; &gt; 
but this didnt agree with the linker not a prob i have had before on<BR>&gt; 
&gt; other projects.<BR>&gt; &gt;<BR>&gt;<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>&gt; #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>&gt;<BR>&gt; 
&gt; so adding the above code block to each file using round works but 
is<BR>&gt; &gt; a bit nasty as thers multiple copys of it now.<BR>&gt; 
&gt;<BR>&gt; &gt; is there another header file that would be better.<BR>&gt; 
&gt; would it be better to simply change round to floor(x+0.5)<BR>&gt; &gt; i 
went to using this method now<BR>&gt; &gt;<BR>&gt; &gt; my thougts are of 
possably commiting the changes and a build guide for<BR>&gt; &gt; visual c++ 
one day so i am asking what would be the best accepted<BR>&gt; &gt; practice 
for this with this project.<BR>&gt; &gt;<BR>&gt; &gt; current progress log so 
far <A href="http://final.";>http://final.</A> servegame. com/kicad. <BR>&gt; 
changelog. log &lt;<A 
href="http://final.servegame.com/kicad.changelog.log";>http://final.<WBR>servegame.<WBR>com/kicad.<WBR>changelog.<WBR>log</A>&gt;<BR>&gt; 
&gt;<BR>&gt;<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