Closed stephan-j-lange closed 9 months ago
I'm not immediately able to reproduce your issue. I've just added a compilable example with #55 which successfully builds.
Can you tell me the output of cargo --version
?
I'm using the following cargo version: cargo 1.75.0 (1d8b05cdd 2023-11-20)
My test program is pretty much the example that you are providing.
use geographiclib_rs::{Geodesic, DirectGeodesic};
fn main() {
// Determine the point 10000 km NE of JFK - the "direct" geodesic calculation.
let g = Geodesic::wgs84();
let jfk_lat = 40.64;
let jfk_lon = -73.78;
let northeast_azimuth = 45.0;
let (lat, lon, az) = g.direct(jfk_lat, jfk_lon, northeast_azimuth, 10e6);
use approx::assert_relative_eq;
assert_relative_eq!(lat, 32.621100463725796);
assert_relative_eq!(lon, 49.05248709295982);
assert_relative_eq!(az, 140.4059858768007);
}
Is it maybe a problem of lazy_static? It has not been maintained for years and there are alternatives available in the standard library now.
Are you able to clone this repository and build the examples?
CI shows that it's possible: https://github.com/georust/geographiclib-rs/pull/55
Is it maybe a problem of lazy_static? It has not been maintained for years and there are alternatives available in the standard library now.
I think it's been stable for years, so it hasn't needed much maintenance.
But yes there are alternatives in std now. Would you be interested in opening a PR to migrate? And do the research to know which MSRV introduced the alternatives so you know what we'd need to bump our MSRV to?
Hello Michael,
I have reinstalled Rust and now it works and I can compile the example application. I still don't understand the reason, but the issue was obviously not related to your repository. Sorry for the inconvenience!
Kind regards, Stephan
Hello,
I'm getting an compilation error when implementing the first example as mentioned in https://crates.io/crates/geographiclib-rs
I have got the same error when compiling a program which uses surrealdb as surrealdb has a dependency to geographiclib-rs v0.2.3.
I'm using a MacBook with the following processor: 2,3 GHz 8-Core Intel Core i9.
Do you have an idea what the problem is?
Kind regards, Stephan