Re: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
Jonathan Polley wrote: > After getting SimGear to build under MSVC 6.0 (thanks Christian), I > moved on to getting all of FlightGear to build. For some reason, MSVC > does not like JSBSim (over 1200 errors generated) but I had no problem > under RH 7.1 (as usual). I expect that everything is a snow ball > started from the errors in FGPropertyManager.h. > > The full build result file can be found at: > > http://homepage.mac.com/eq_fidget/FG_Dox/FlightGear.html It's just a matter of removing (*all*) the 'FGPropertyManager::' sections within the class (or file). Erik ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
On Thursday, March 21, 2002, at 03:37 AM, Erik Hofman wrote: Jonathan Polley wrote: After getting SimGear to build under MSVC 6.0 (thanks Christian), I moved on to getting all of FlightGear to build. For some reason, MSVC does not like JSBSim (over 1200 errors generated) but I had no problem under RH 7.1 (as usual). I expect that everything is a snow ball started from the errors in FGPropertyManager.h. The full build result file can be found at: http://homepage.mac.com/eq_fidget/FG_Dox/FlightGear.html It's just a matter of removing (*all*) the 'FGPropertyManager::' sections within the class (or file). Erik When I do that, it complains about the multiple definitions of 'Tie.' When it starts failing the compile, it is on the second, and subsequent, definitions of 'FGPropertyManager::Tie.' When I comment out *ALL* instances of 'Tie' (however you want to define it), I still get a major explosion which makes absolutely NO sense: Compiling... FGAerodynamics.cpp c:\flightgear\src\fdm\jsbsim\fgmodel.h(67) : error C2059: syntax error : 'namespace' c:\flightgear\src\fdm\jsbsim\fgmodel.h(67) : error C2238: unexpected token(s) preceding ';' c:\program files\microsoft visual studio\vc98\include\fstream(15) : error C2059: syntax error : 'namespace' c:\program files\microsoft visual studio\vc98\include\fstream(15) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body c:\flightgear\src\fdm\jsbsim\fgconfigfile.h(46) : error C2886: 'std::string' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgconfigfile.h(48) : error C2886: 'std::ostream' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgconfigfile.h(49) : error C2886: 'std::istream' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgconfigfile.h(50) : error C2886: 'std::ifstream' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgconfigfile.h(51) : error C2886: 'std::cerr' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgconfigfile.h(52) : error C2886: 'std::endl' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgconfigfile.h(53) : error C2886: 'std::ios' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgconfigfile.h(54) : error C2886: 'std::cout' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgmatrix33.h(30) : error C2886: 'std::string' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgmatrix33.h(32) : error C2886: 'std::ostream' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgmatrix33.h(33) : error C2886: 'std::istream' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgmatrix33.h(34) : error C2886: 'std::cerr' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgmatrix33.h(35) : error C2886: 'std::cout' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgmatrix33.h(36) : error C2886: 'std::endl' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgcolumnvector3.h(28) : error C2886: 'std::string' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgcolumnvector3.h(30) : error C2886: 'std::ostream' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgcolumnvector3.h(31) : error C2886: 'std::istream' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgcolumnvector3.h(32) : error C2886: 'std::cerr' : symbol cannot be used in a member using-declaration c:\flightgear\src\fdm\jsbsim\fgcolumnvector3.h(33) : error C2886: 'std::cout' : symbol cannot be used in a member using-declaration Jonathan Polley
Re: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
Jonathan Polley wrote: > > On Thursday, March 21, 2002, at 03:37 AM, Erik Hofman wrote: > > Jonathan Polley wrote: > > After getting SimGear to build under MSVC 6.0 (thanks Christian), I moved >on to getting all of FlightGear to build. For some reason, MSVC does not like JSBSim >(over 1200 errors generated) but I had no problem under RH 7.1 (as usual). I expect >that everything is a snow ball started from the errors in FGPropertyManager.h. > The full build result file can be found at: > http://homepage.mac.com/eq_fidget/FG_Dox/FlightGear.html > > It's just a matter of removing (*all*) the 'FGPropertyManager::' sections >within the class (or file). > > Erik > > When I do that, it complains about the multiple definitions of 'Tie.' When it starts >failing the compile, it is on the second, and subsequent, definitions of >'FGPropertyManager::Tie.' > > When I comment out *ALL* instances of 'Tie' (however you want to define it), I still >get a major explosion which makes absolutely NO sense: > [snip] You're right, it doesn't make any sense. Perhaps you commented out too much? Anyways, I've managed to compile a recent FlightGear JSBSim. The problems I encountered seem to be that MSVC can not deduce which overloaded member function to call: Compiling... FGAerodynamics.cpp c:\src\flightgear\src\fdm\jsbsim\fgaerodynamics.cpp(229) : error C2661: 'Tie' : no overloaded function takes 4 parameters Adding an ugly cast fixes the problem: PropertyManager->Tie("forces/fbx-aero-lbs", this,1, (double (FGAerodynamics::*)(int) const) &FGAerodynamics::GetForces); A similar cast is required on every pointer to member function that takes an index, probably because there is a similar named member function that takes no index: class FGAerodynamics : public FGModel { ... FGColumnVector3& GetForces(void) {return vForces;} inline double GetForces(int n) const {return vForces(n);} On that note, since we are taking a pointer to a member function, the compiler must emit a function body. Thus the member function can't be inline. This may help decide which functions to inline. Cheers, Bernie ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
RE: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
> Compiling... > FGAerodynamics.cpp > c:\src\flightgear\src\fdm\jsbsim\fgaerodynamics.cpp(229) : error C2661: > 'Tie' : no overloaded function takes 4 parameters > > Adding an ugly cast fixes the problem: > > PropertyManager->Tie("forces/fbx-aero-lbs", this,1, > (double (FGAerodynamics::*)(int) const) &FGAerodynamics::GetForces); > > A similar cast is required on every pointer to member function that > takes an index, probably because there is a similar named member > function that takes no index: > > class FGAerodynamics : public FGModel { > ... > FGColumnVector3& GetForces(void) {return vForces;} > inline double GetForces(int n) const {return vForces(n);} > > On that note, since we are taking a pointer to a member function, the > compiler must emit a function body. Thus the member function can't be > inline. This may help decide which functions to inline. > > Cheers, > Bernie Are we doing something unusual, or is MSVC requiring something it shouldn't? Jon ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
RE: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
On Sun, 2002-03-24 at 06:43, Jon Berndt wrote: > > Compiling... > > FGAerodynamics.cpp > > c:\src\flightgear\src\fdm\jsbsim\fgaerodynamics.cpp(229) : error C2661: > > 'Tie' : no overloaded function takes 4 parameters > > > > Adding an ugly cast fixes the problem: > > > > PropertyManager->Tie("forces/fbx-aero-lbs", this,1, > > (double (FGAerodynamics::*)(int) const) &FGAerodynamics::GetForces); > > > > A similar cast is required on every pointer to member function that > > takes an index, probably because there is a similar named member > > function that takes no index: > > > > class FGAerodynamics : public FGModel { > > ... > > FGColumnVector3& GetForces(void) {return vForces;} > > inline double GetForces(int n) const {return vForces(n);} > > > > On that note, since we are taking a pointer to a member function, the > > compiler must emit a function body. Thus the member function can't be > > inline. This may help decide which functions to inline. > > > > Cheers, > > Bernie > > > Are we doing something unusual, or is MSVC requiring something it shouldn't? Aside from the point about the inlines, it seems like it should be just fine. The overload is fair and legal. > > Jon > > > ___ > Flightgear-devel mailing list > [EMAIL PROTECTED] > http://mail.flightgear.org/mailman/listinfo/flightgear-devel > -- Tony Peden [EMAIL PROTECTED] We all know Linux is great ... it does infinite loops in 5 seconds. -- attributed to Linus Torvalds ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
RE: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
Jon Berndt writes: > Are we doing something unusual, or is MSVC requiring something it > shouldn't? The latter, I think, since the pointer type can be determined unambiguously from the method signature. All the best, David -- David Megginson [EMAIL PROTECTED] ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
On Sunday, March 24, 2002, at 04:18 AM, Bernie Bright wrote: > Jonathan Polley wrote: >> >> On Thursday, March 21, 2002, at 03:37 AM, Erik Hofman wrote: >> >> Jonathan Polley wrote: >> >> After getting SimGear to build under MSVC 6.0 (thanks >> Christian), I moved on to getting all of FlightGear to build. For some >> reason, MSVC does not like JSBSim (over 1200 errors generated) but I had >> no problem under RH 7.1 (as usual). I expect that everything is a snow >> ball started from the errors in FGPropertyManager.h. >> The full build result file can be found at: >> http://homepage.mac.com/eq_fidget/FG_Dox/FlightGear.html >> >> It's just a matter of removing (*all*) the 'FGPropertyManager::' >> sections within the class (or file). >> >> Erik >> >> When I do that, it complains about the multiple definitions of 'Tie.' >> When it starts failing the compile, it is on the second, and subsequent, >> definitions of 'FGPropertyManager::Tie.' >> >> When I comment out *ALL* instances of 'Tie' (however you want to define >> it), I still get a major explosion which makes absolutely NO sense: >> > [snip] > > You're right, it doesn't make any sense. Perhaps you commented out too > much? > I probably did. I removed teh definitions rather than the removing the 'FGPropertyManager::' portion of the definitions. > Anyways, I've managed to compile a recent FlightGear JSBSim. The > problems I encountered seem to be that MSVC can not deduce which > overloaded member function to call: > > Compiling... > FGAerodynamics.cpp > c:\src\flightgear\src\fdm\jsbsim\fgaerodynamics.cpp(229) : error C2661: > 'Tie' : no overloaded function takes 4 parameters After Tony made his updates, I sent a post that told about the problems with the 'Tie' parameter counts: http://seneca.me.umn.edu/pipermail/flightgear-devel/2002-March/005703.html > Adding an ugly cast fixes the problem: > > PropertyManager->Tie("forces/fbx-aero-lbs", this,1, > (double (FGAerodynamics::*)(int) const) &FGAerodynamics::GetForces); I'll roll that change into my copy until it gets made permanently. While we are on the subject of MSVC, were you able to link with the files from CVS? In addition to the new files, I had to modify some other parts to the .dsp file(s) to make a link. Thanks, Jonathan Polley ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
RE: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
> > Adding an ugly cast fixes the problem: > > > > PropertyManager->Tie("forces/fbx-aero-lbs", this,1, > > (double (FGAerodynamics::*)(int) const) &FGAerodynamics::GetForces); > > I'll roll that change into my copy until it gets made permanently. While We'll do a little investigating, first. I want to understand why MSVC is having problems, first, when no other compiler appears to be complaining. We want to remain as cross-platform/cross-compiler compatible as possible, but as a matter of policy, I am extremely hesitant to make crutches in our code to fix a crippled compiler - if, indeed, it turns out to be a problem with MSVC. Do you have any explanatory backup for why MSVC isn't working with this? I know this sounds rude of me, but I hope you can see where I am coming from. Jon ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
Jonathan Polley wrote: > > While we are on the subject of MSVC, were you able to link with the files from > CVS? In addition to the new files, I had to modify some other parts to > the .dsp file(s) to make a link. I have compiled and linked a recent (one or two day old) cvs snapshot using MSVC6. Some customizations are required to the project file, library paths for example. I did have problems linking with multiply defined symbols. It turned out that plib is compiled multi-threaded whilst everything else is single threaded. Recompiling plib solved the problem. The workspace and project files are auto generated. I wrote the script that generates them. If you have specific requests or ideas in that area then contact me offline. There are some minor tweaks I was about to submit to Curt but I can hold off for a day or two. Cheers, Bernie ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
RE: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
Jon Berndt writes: > >> > Adding an ugly cast fixes the problem: >> > >> > PropertyManager->Tie("forces/fbx-aero-lbs", this,1, >> > (double (FGAerodynamics::*)(int) const) >&FGAerodynamics::GetForces); >> >> I'll roll that change into my copy until it gets made >permanently. While > > >We'll do a little investigating, first. I want to understand why MSVC is >having problems, first, when no other compiler appears to be complaining. We >want to remain as cross-platform/cross-compiler compatible as possible, but >as a matter of policy, I am extremely hesitant to make crutches in our code >to fix a crippled compiler - if, indeed, it turns out to be a problem with >MSVC. Do you have any explanatory backup for why MSVC isn't working with >this? Jon, I don't think there is a 'conforming' compiler yet, and MSVC6 is several years old and I wonder how well the then current gnu stdlib++ would have handled that construct :-)) That said I will agree that MSVC6 even with all the service packs is a 'little' behind most of the others in being able to handle some of the more 'arcane' bits of C++. There is STLPort however that should work just with just about any compiler even MSVC :-) http://www.stlport.org Cheers Norman ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
Jon Berndt wrote: > > > > Adding an ugly cast fixes the problem: > > > > > > PropertyManager->Tie("forces/fbx-aero-lbs", this,1, > > > (double (FGAerodynamics::*)(int) const) &FGAerodynamics::GetForces); > > > > I'll roll that change into my copy until it gets made permanently. While > > We'll do a little investigating, first. I want to understand why MSVC is > having problems, first, when no other compiler appears to be complaining. We > want to remain as cross-platform/cross-compiler compatible as possible, but > as a matter of policy, I am extremely hesitant to make crutches in our code > to fix a crippled compiler - if, indeed, it turns out to be a problem with > MSVC. Do you have any explanatory backup for why MSVC isn't working with > this? I know this sounds rude of me, but I hope you can see where I am > coming from. I'm not sure if it is actually a problem with MSVC or if other compilers have different rules when it comes to taking the address of an overloaded function. I have encountered this exact same problem before, with even gcc requiring a cast to disambiguate pointers to overloaded member functions. Note that the cast is portable, I've tested with gcc 2.95.3 at least. The only explanation I can offer is that &FGAerodynamics::GetForces is ambiguous given the declaration class FGAerodynamics : public FGModel { FGColumnVector3& GetForces(void); double GetForces(int n) const; ... The cast is a hint to the compiler which of the two GetForces() member functions we are taking the address of. I have no idea why MSVC can't deduce the correct member while other compilers can but that is the essence of the problem as I understand it. Cheers, Bernie ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
Norman Vine wrote: > > Jon, I don't think there is a 'conforming' compiler yet, and MSVC6 is > several years > old and I wonder how well the then current gnu stdlib++ would have handled > that > construct :-)) > I believe Comeau is 99.9% conforming but it is not free. I also believe that MSVC7 is much much better, they are using boost (http://www.boost.org) as one of their conformance acceptance tests, as are the gcc 3 crew. > That said I will agree that MSVC6 even with all the service packs > is a 'little' behind most of the others in being able to handle some of > the more 'arcane' bits of C++. > > There is STLPort however that should work just with just about any compiler > even MSVC :-) > True, however this particular problem is compiler related not library related for once. Cheers, Bernie ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
RE: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
> from: [EMAIL PROTECTED] You aren't at Flight Dynamics division, are you? > error. Does specifying '--pedantic' on the gcc command line cause any > other warnings? > Jonathan Polley If I try using the --pedantic option I get this: --- start -- g++ -I../ --pedantic -Wall -oFGDeadBand.o -c FGDeadBand.cpp g++ -I../ --pedantic -Wall -oFGFilter.o -c FGFilter.cpp FGFilter.cpp: In method `void FGFilter::Debug(int)': FGFilter.cpp:224: warning: use proper indentation FGFilter.cpp:224: warning: you are obviously a newbie; try Visual Basic g++ -I../ --pedantic -Wall -oFGGradient.o -c FGGradient.cpp g++ -I../ --pedantic -Wall -oFGSwitch.o -c FGSwitch.cpp g++ -I../ --pedantic -Wall -oFGFCSComponent.o -c FGFCSComponent.cpp FGFCSComponent.cpp: warning: you didn't use `itBias' what's the deal!? FGFCSComponent.cpp:91: warning: This code is nauseating me g++ -I../ --pedantic -Wall -oFGGain.o -c FGGain.cpp FGGain.cpp: In method `void FGGain::Debug(int)': FGGain.cpp: error: compiler getting sick ... cannot go on ... must . Internal combustion error --- end -- So, obviously something is wrong. Not only am I perplexed, I am offended and crushed. ;-) Actually, I tried the --pedantic option and got no additional errors. My gcc version is 2.95.3-5 ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
RE: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
On Sun, 2002-03-24 at 18:09, Jon Berndt wrote: > > from: [EMAIL PROTECTED] > > You aren't at Flight Dynamics division, are you? > > > error. Does specifying '--pedantic' on the gcc command line cause any > > other warnings? > > Jonathan Polley > > If I try using the --pedantic option I get this: > > --- start -- > g++ -I../ --pedantic -Wall -oFGDeadBand.o -c FGDeadBand.cpp > g++ -I../ --pedantic -Wall -oFGFilter.o -c FGFilter.cpp > FGFilter.cpp: In method `void FGFilter::Debug(int)': > FGFilter.cpp:224: warning: use proper indentation > FGFilter.cpp:224: warning: you are obviously a newbie; try Visual Basic > g++ -I../ --pedantic -Wall -oFGGradient.o -c FGGradient.cpp > g++ -I../ --pedantic -Wall -oFGSwitch.o -c FGSwitch.cpp > g++ -I../ --pedantic -Wall -oFGFCSComponent.o -c FGFCSComponent.cpp > FGFCSComponent.cpp: warning: you didn't use `itBias' what's the deal!? > FGFCSComponent.cpp:91: warning: This code is nauseating me > g++ -I../ --pedantic -Wall -oFGGain.o -c FGGain.cpp > FGGain.cpp: In method `void FGGain::Debug(int)': > FGGain.cpp: error: compiler getting sick ... cannot go on ... must . > > Internal combustion error > > --- end -- Are you sure you didn't use the --whine switch? > > So, obviously something is wrong. Not only am I perplexed, I am offended and > crushed. > > ;-) > > Actually, I tried the --pedantic option and got no additional errors. My gcc > version is 2.95.3-5 > > > ___ > Flightgear-devel mailing list > [EMAIL PROTECTED] > http://mail.flightgear.org/mailman/listinfo/flightgear-devel -- Tony Peden [EMAIL PROTECTED] We all know Linux is great ... it does infinite loops in 5 seconds. -- attributed to Linus Torvalds ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
On Sunday, March 24, 2002, at 08:49 PM, Tony Peden wrote: On Sun, 2002-03-24 at 18:09, Jon Berndt wrote: from: [EMAIL PROTECTED] You aren't at Flight Dynamics division, are you? error. Does specifying '--pedantic' on the gcc command line cause any other warnings? Jonathan Polley If I try using the --pedantic option I get this: --- start -- g++ -I../ --pedantic -Wall -oFGDeadBand.o -c FGDeadBand.cpp g++ -I../ --pedantic -Wall -oFGFilter.o -c FGFilter.cpp FGFilter.cpp: In method `void FGFilter::Debug(int)': FGFilter.cpp:224: warning: use proper indentation FGFilter.cpp:224: warning: you are obviously a newbie; try Visual Basic g++ -I../ --pedantic -Wall -oFGGradient.o -c FGGradient.cpp g++ -I../ --pedantic -Wall -oFGSwitch.o -c FGSwitch.cpp g++ -I../ --pedantic -Wall -oFGFCSComponent.o -c FGFCSComponent.cpp FGFCSComponent.cpp: warning: you didn't use `itBias' what's the deal!? FGFCSComponent.cpp:91: warning: This code is nauseating me g++ -I../ --pedantic -Wall -oFGGain.o -c FGGain.cpp FGGain.cpp: In method `void FGGain::Debug(int)': FGGain.cpp: error: compiler getting sick ... cannot go on ... must . Internal combustion error --- end -- Are you sure you didn't use the --whine switch? I think --pedantic == --whine. FWIW, this is Merrian-Webster has to say ) Pronunciation: pi-'dan-tik Function: adjective Date: circa 1600 1 : of, relating to, or being a pedant 2 : narrowly, stodgily, and often ostentatiously learned 3 : UNIMAGINATIVE, PEDESTRIAN So, obviously something is wrong. Not only am I perplexed, I am offended and crushed. ;-) Actually, I tried the --pedantic option and got no additional errors. My gcc version is 2.95.3-5 In the past, when MSVC complained about something and gcc did not, using --pedantic caused them to agree (MSVC would be errors and gcc would be warnings). I was hoping this would be the case again. *sign* I am grasping at some pretty thin straws with these, but do this make any sense: Could the compiler be getting confused by the (inlined?) functions called Tie and the templates called Tie? The versions of Tie that have four parameters are the templates, as far as I can tell. If this were C or Ada, I could probably point to the problem, but this being C++, and templates to boot, I haven't the foggiest idea. Thanks, Jonathan Polley
RE: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
Jonathan Polley writes: FGFilter.cpp: In method `void FGFilter::Debug(int)':FGFilter.cpp:224: warning: use proper indentationFGFilter.cpp:224: warning: you are obviously a newbie; try Visual Basic If you look at line 224 there is some 'strange formatting' in the cout << I would suggest concatenating line 224 qnd line 225 into one --following all one line-- cout << " INPUT: FCS Component " << InputIdx << " (" << fcs->GetComponentName(InputIdx) << ")" << endl; or breaking it up something like this cout << " INPUT: FCS Component " << InputIdx << " (" ; cout << fcs->GetComponentName(InputIdx) << ")" << endl; Cheers Norman
RE: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
On Sun, 2002-03-24 at 11:28, Jon Berndt wrote: > > > Adding an ugly cast fixes the problem: > > > > > > PropertyManager->Tie("forces/fbx-aero-lbs", this,1, > > > (double (FGAerodynamics::*)(int) const) &FGAerodynamics::GetForces); > > > > I'll roll that change into my copy until it gets made permanently. While > > > We'll do a little investigating, first. I want to understand why MSVC is > having problems, first, when no other compiler appears to be complaining. We > want to remain as cross-platform/cross-compiler compatible as possible, but > as a matter of policy, I am extremely hesitant to make crutches in our code > to fix a crippled compiler - if, indeed, it turns out to be a problem with > MSVC. Do you have any explanatory backup for why MSVC isn't working with > this? I know this sounds rude of me, but I hope you can see where I am > coming from. It's unfortunate but I think we're going to have to incorporate this cast. However, I do think we could clean it up a bit with a pre-processor define: #define AEROINTFUNC double (FGAerodynamics::*)(int) const then PropertyManager->Tie("forces/fbx-aero-lbs", this,1, (AEROINTFUNC)&FGAerodynamics::GetForces); Hopefully, its still clear that that is a cast. Assuming Jon does not object, I will accept patches that look like the above. > > Jon > > > ___ > Flightgear-devel mailing list > [EMAIL PROTECTED] > http://mail.flightgear.org/mailman/listinfo/flightgear-devel -- Tony Peden [EMAIL PROTECTED] We all know Linux is great ... it does infinite loops in 5 seconds. -- attributed to Linus Torvalds ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
Tony Peden wrote: > > It's unfortunate but I think we're going to have to incorporate this > cast. > > However, I do think we could clean it up a bit with a pre-processor > define: > #define AEROINTFUNC double (FGAerodynamics::*)(int) const > then > PropertyManager->Tie("forces/fbx-aero-lbs", this,1, > (AEROINTFUNC)&FGAerodynamics::GetForces); > > Hopefully, its still clear that that is a cast. > > Assuming Jon does not object, I will accept patches that look like the > above. Okay, I'll make the changes to the current JSBSim cvs snapshot (not the one in FlightGear) and send you the patches. However I might try a typedef instead of a macro. Cheers, Bernie ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
RE: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
> > Assuming Jon does not object, I will accept patches that look like the > > above. > > Okay, I'll make the changes to the current JSBSim cvs snapshot (not the > one in FlightGear) and send you the patches. However I might try a > typedef instead of a macro. I'm not quite ready to "not object". Give me this evening to have another look and grow slowly to accept the inevitable ;-) Jon ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
On Mon, 2002-03-25 at 15:43, Bernie Bright wrote: > Tony Peden wrote: > > > > It's unfortunate but I think we're going to have to incorporate this > > cast. > > > > However, I do think we could clean it up a bit with a pre-processor > > define: > > #define AEROINTFUNC double (FGAerodynamics::*)(int) const > > then > > PropertyManager->Tie("forces/fbx-aero-lbs", this,1, > > (AEROINTFUNC)&FGAerodynamics::GetForces); > > > > Hopefully, its still clear that that is a cast. > > > > Assuming Jon does not object, I will accept patches that look like the > > above. > > Okay, I'll make the changes to the current JSBSim cvs snapshot (not the > one in FlightGear) and send you the patches. However I might try a > typedef instead of a macro. Bernie, Johnathan: have you had similar difficulties compiling src/Controls/controls.cxx? (it also ties indexed object methods) > > Cheers, > Bernie > > ___ > Flightgear-devel mailing list > [EMAIL PROTECTED] > http://mail.flightgear.org/mailman/listinfo/flightgear-devel -- Tony Peden [EMAIL PROTECTED] We all know Linux is great ... it does infinite loops in 5 seconds. -- attributed to Linus Torvalds ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
Tony, Oddly enough, src/Controls/controls.cxx compiles just fine. Jonathan Polley On Monday, March 25, 2002, at 09:08 PM, Tony Peden wrote: > On Mon, 2002-03-25 at 15:43, Bernie Bright wrote: >> Tony Peden wrote: >>> >>> It's unfortunate but I think we're going to have to incorporate this >>> cast. >>> >>> However, I do think we could clean it up a bit with a pre-processor >>> define: >>> #define AEROINTFUNC double (FGAerodynamics::*)(int) const >>> then >>> PropertyManager->Tie("forces/fbx-aero-lbs", this,1, >>> (AEROINTFUNC)&FGAerodynamics::GetForces); >>> >>> Hopefully, its still clear that that is a cast. >>> >>> Assuming Jon does not object, I will accept patches that look like the >>> above. >> >> Okay, I'll make the changes to the current JSBSim cvs snapshot (not the >> one in FlightGear) and send you the patches. However I might try a >> typedef instead of a macro. > > Bernie, Johnathan: have you had similar difficulties compiling > src/Controls/controls.cxx? > > (it also ties indexed object methods) >> >> Cheers, >> Bernie >> >> ___ >> Flightgear-devel mailing list >> [EMAIL PROTECTED] >> http://mail.flightgear.org/mailman/listinfo/flightgear-devel > -- > Tony Peden > [EMAIL PROTECTED] > We all know Linux is great ... it does infinite loops in 5 seconds. > -- attributed to Linus Torvalds > > ___ > Flightgear-devel mailing list > [EMAIL PROTECTED] > http://mail.flightgear.org/mailman/listinfo/flightgear-devel ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
Tony Peden wrote: > > > Bernie, Johnathan: have you had similar difficulties compiling > src/Controls/controls.cxx? > > (it also ties indexed object methods) Compiles just fine. The difference is that the member function being tied is unambiguous. Cheers, Bernie ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
RE: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0
Behalf Of Norman VineSent: Sunday, March 24, 2002 10:55 PMTo: [EMAIL PROTECTED]Subject: RE: [Flightgear-devel] Problems Building JSBSim using MSVC 6.0 FGFilter.cpp: In method `void FGFilter::Debug(int)':FGFilter.cpp:224: warning: use proper indentationFGFilter.cpp:224: warning: you are obviously a newbie; try Visual Basic If you look at line 224 there is some 'strange formatting' in the cout << I would suggest concatenating line 224 qnd line 225 into one --following all one line-- cout << " INPUT: FCS Component " << InputIdx << " (" << fcs->GetComponentName(InputIdx) << ")" << endl; or breaking it up something like this cout << " INPUT: FCS Component " << InputIdx << " (" ; cout << fcs->GetComponentName(InputIdx) << ")" << endl; The error messages I wrote were a joke. Anyhow, there is no strange formatting in line 224. It's perfectly legal and straightforward. It might be confusing to *read*, I'll grant. I split it up that way to try and stay under 80 characters per line.