I removed the first function, I don't know how it got added. I  
probably clicked something on the class wizard by accident. I've  
fixed the scoping of i too, I cause that kind of error in VC6 a lot  
whenever I use newer compilers.

   Thanks for looking into the problems, it saved me having to  
reinstall VC6. I used to have it installed at work and on my laptop  
but I upgraded both recently and haven't installed it yet.


On Mar 14, 2007, at 10:28 PM, Joshua Delahunty wrote:

> John wrote:
>>> I haven't pay attention to LeoCAD for a while but could somebody
>>> please tell me where I can download the latest version?  I know a  
>>> lot
>>> of work happened since 0.75 (the one on the website.
>>>
>
> Philo wrote:
>> None that I know... and latest source version doesn't compile with my
>> old VC++6.0 :-(
>
> I think the following two source code fixes will fix Philo's  
> problem (I
> am able to build with them under VC 6)...
>
> 1) Line 55 of Propspgs.cpp reads thus:
>       ON_EN_CHANGE(IDC_PROP_SUM_NAME,  
> &CPropertiesSummary::OnEnChangePropSumName)
>
> VC 6.0 doesn't like this syntax, throwing 6 errors based on it.
>
> Replace that line with:
>       ON_EN_CHANGE(IDC_PROP_SUM_NAME, OnEnChangePropSumName)
>
> (that is, remove the text "&CPropertiesSummary::")
>
> the CPropertiesSummary:: scoping is unnecessary, since this use is
> within that scope already, and there is no reason to use the  
> address-of
> operator on OnEnChangePropSumName, since it is a member function of
> CPropertiesSummary, and would be furnished as an address by the  
> compiler
> in any case (furthermore, the function doesn't actually do anything  
> yet
> :-)).
>
> 2) Lines 889 and 909 cause a conflict with one another.  The scoping
> rules of variables declared in for() statements changed in the ANSI
> standard, and VC 6 is unhappy about this usage; it sees that i has  
> been
> declared twice within the scope of SystemUpdateModelMenu.  There are a
> couple fixes to this. The loop at lines 889-890 could be changed to  
> use
> a different identifier (such as i2 -- see my alternate instructions
> below for the best type of solution); the lines from 909-947 could  
> also
> be changed.
>
> EASIEST STEP 2 SOLUTION if you want as few code changes as possible
> The easiest is to change line 909 from:
>       for (int i = 0; i < ModelList.GetSize(); i++)
> to:
>       for (i = 0; i < ModelList.GetSize(); i++)
> END EASIEST STEP 2 SOLUTION
>
> (just remove the int declarator on i)
>
> this will "reuse" i from the first declaration and build cleanly.
>
> If you just want it building under VC 6, you're done.  
> Unfortunately, the
> second solution will then cause Visual Studio 2005 to stop building
> because of line 909.  Eventually, a change something like this is  
> necessary:
>
> ALTERNATE STEP 2 SOLUTION that is more universal:
> - leave line 909 alone (don't perform both of these solutions)
> - change 889-890 from:
>       for (int i = 1; i < LC_MODEL_MENU_MAX; i++)
>               Menu->DeleteMenu(ID_MODEL_MODEL1 + i, MF_BYCOMMAND);
> to:
>       for (int j = 1; j < LC_MODEL_MENU_MAX; j++)
>               Menu->DeleteMenu(ID_MODEL_MODEL1 + j, MF_BYCOMMAND);
>
> (change all references to identifier i to a new identifier j)
> END ALTERNATE STEP 2 SOLUTION
>
> Note that I am not building 3dsftk, jpeglib, libpng or zlib in the
> version I'm working with, so I had to unload those projects in  
> order to
> get the link to work properly.
>
> Note further that, in order to get the source to fully build with  
> Visual
> Studio .NET, I had to add wininet.lib to the list of link libraries  
> - I
> think this is possibly related to buggy behavior when VS.NET converted
> the .dsw file to a .vsproj file, since VC 6 was able to build fine
> without this adjustment.
>
>                                       -- joshua
>
> _______________________________________________
> Leocad mailing list
> [email protected]
> https://list.gerf.org/listinfo/leocad
>


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

_______________________________________________
Leocad mailing list
[email protected]
https://list.gerf.org/listinfo/leocad

Reply via email to