[Flightgear-devel] MSVC8 link problem - Missing function in gnnode.cxx?
Hi Durk, The file src/Airports/gnnode.hxx declares a function - FGTaxiNode(double, double, int); Then in parking.hxx, you added - : FGTaxiNode(lat,lon,idx); about July 5 from the CVS logs ... In WIN32, MSVC8 can NOT locate this function, and marks it as a missing external. It seems obvious from the code that this should be something like - FGTaxiNode::FGTaxiNode(double lat, double lon, int idx) { setIndex(idx); setLatitude(lat); setLongitude(lon); } which I added to gnnode.cxx, and got my clean link, but really wonder why this has not come up on other systems. How can they resolve FGTaxiNode(lat,lon,idx);??? Or have I missed something here? The src/Airports/makefile.am seems to include both parking.cxx and gnnode.cxx since about mid-July ... Regards, Geoff. EOF - Devel-05.doc _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] MSVC8 link problem - Missing function in gnnode.cxx?
Hi Geoff, On Monday 06 August 2007 13:46, Geoff Air wrote: > Hi Durk, > > The file src/Airports/gnnode.hxx declares a function - > > FGTaxiNode(double, double, int); > > Then in parking.hxx, you added - > > : FGTaxiNode(lat,lon,idx); > > about July 5 from the CVS logs ... > > In WIN32, MSVC8 can NOT locate this function, and marks it as a missing > external. > Thanks for reporting. Incidentally, I have been playing with this code a bit over the last couple of days and also noticed that this constructor, altough declared was never defined. At first, I was also surprised to find that I never got a compilation error, but then I realized that the offending code is never called insside FlightGear. It is only used once inside a FGParking constructor, but that particular constructor is never used. For that reason, I have, in my local source tree, removed the declaration of this constructor. My guess is that it is compiler specific whether declaring but not defining a constructor results in a compilation error. In this specific case, the offending constructor (FGTaxiNode(double, double, int) was called by the constructor of FGParking, which in turn was never called by FlightGear. I'm assuming that MSVC wanted to link in the code for FGTaxiNode(double, double, int), because it found it was used in FGParking. whereas gcc, didn't link in FGParking(double, double,int) in the first place and therefore also didn't bother to link in the code for FGTaxiNode. I will commit the new code shortly, probably tomorrow or the day after tomorrow. I just finished giving it the first round of tests, but still need to remove the debug statements, and do some fine-tuning Cheers, Durk - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] MSVC8 link problem - Missing function in gnnode.cxx?
Tuesday, August 07, 2007. Hi Durk, Vivian, Reagan, et al ... Thanks for the replies ... The reason my MSVC8 complains is simple now that I think about it. I use my OWN flightgear.vcproj file, which includes all modules in a single line, as part of 'main'. Much easier to find sources in a simple alphabetic list ... I also do this for SG. If you are using MSVC, using either the default FG DSP files, or those from the Olaf Flebbe page, then these separate FG into a static library, (or libraries) and a 'main'. You can have unresolved items in a static library without complaint, provided it is never called from 'main' - that is the module is never extracted and added to the EXE by the linker ... Likewise I suspect the gcc build is also separated like this ... I use my own _TWO SOLUTION SYSTEM_ from this page :- http://geoffair.net/fg/fgfs-040.htm Problem solved. Thanks. Regards, Geoff. EOF - Devel-06.doc _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] MSVC8 link problem - Missing function in gnnode.cxx?
On Tuesday 07 August 2007 18:21, Geoff Air wrote: > > You can have unresolved items in a static library without complaint, > provided it is never called from 'main' - that is the module is never > extracted and added to the EXE by the linker ... > FWIW, the code I referred to is now committed. Cheers, Durk - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel