On Sun, 14 Oct 2012 20:47:01 +0200 (CEST)
Frederic Bouvier <fredfgf...@free.fr> wrote:

> t1.update( SGGeod::fromRad(lon, lat), 0, 0 );
> 
> There is also SGGeod::fromDeg to avoid the multiply by SGD_DEGREES_TO_RADIANS
> 
> Regards,
> -Fred
> 
> ----- Mail original -----
> > De: "Alasdair Campbell" <ali...@btinternet.com>
> > À: "FlightGear devel" <flightgear-devel@lists.sourceforge.net>
> > Envoyé: Dimanche 14 Octobre 2012 18:26:54
> > Objet: [Flightgear-devel] Simgear commit breaks Atlas (ot??)
> > 
> > After SGTime: use SGGeod, quieter init. (James Turner
> > 89d30acbc5040bf36a3329fcb21789d2855fa6d3)
> > Atlas build (misc.cxx) fails at:
> > 
> > double magneticVariation(double lat, double lon, double elev)
> > {
> >     SGTime t1;
> > 
> >     lon *= SGD_DEGREES_TO_RADIANS;
> >     lat *= SGD_DEGREES_TO_RADIANS;
> >     t1.update(lon, lat, 0, 0);
> > 
> >     return sgGetMagVar(lon, lat, elev, t1.getJD()) *
> >     SGD_RADIANS_TO_DEGREES;
> > }
> > 
> > Can I get a suggestion to update this code in my local repo to:
> >     t1.update( const SGGeod& location, time_t ct, long int warp )
> > Sorry, my c++ is so really rusty.
> > 
> > Alasdair
> > 


Thank you Fred. I had tried something similar, but your suggestion still gives 
link error:

g++  -g -O2 -DFGBASE_DIR='"NONE/lib/FlightGear"'  -L/usr/local//lib -o Atlas 
Notifications.o Atlas.o GLUTWindow.o AtlasBaseWindow.o AtlasWindow.o 
AtlasController.o FlightTrack.o Image.o NavData.o Overlays.o AirportsOverlay.o 
AirwaysOverlay.o FixesOverlay.o NavaidsOverlay.o FlightTracksOverlay.o 
CrosshairsOverlay.o RangeRingsOverlay.o Tiles.o TileMapper.o Searcher.o 
Search.o Preferences.o Graphs.o Culler.o Scenery.o Background.o Cache.o 
LayoutManager.o Bucket.o Subbucket.o Palette.o misc.o Globals.o Geographics.o 
-lsgmagvar -lsgtiming -lsgmisc -lsgio -lsgserial -lsgdebug -lsgbucket 
-lsgstructure -lsgmath -lsgthreads -lplibsg -lplibpuaux -lplibpu -lplibfnt 
-lplibnet -lglut -lGLU -lGL -lXmu -lXt -lSM -lICE -lXi -lXext -lX11 -lpthread 
-lrt -lm  -lpng -lz -ljpeg -lGLEW -lplibul -lcurl -lrt -lm 
misc.o: In function `magneticVariation(double, double, double)':
/home/alasdair/Desktop/Atlas/src/misc.cxx:405: undefined reference to 
`SGTime::update(SGGeod const&, long, long)'
collect2: error: ld returned 1 exit status
make[3]: *** [Atlas] Error 1

I am pulling my hair out:( 
Do I need to link against another sg library?

Kind regards,
Alasdair




------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to