Skip to content

Error reported when cross compiling on Windows #524

@allenlu2008

Description

@allenlu2008

I need to cross-compile the Linux environment on Windows. Run the command as follows:

cargo build --release --target=x86_64-unknown-linux-musl

output:

Compiling gdal-sys v0.9.1
Compiling nalgebra v0.30.1
Compiling itertools v0.10.5
Compiling log v0.4.20
Compiling float_next_after v1.0.0
Compiling bitflags v2.4.2
Compiling rand v0.8.5
Compiling lazy_static v1.4.0
Compiling dotenv v0.15.0
Compiling gdal v0.16.0
Compiling geo v0.28.0
error: could not find native static library gdal_i, perhaps an -L flag is missing?

error: could not compile gdal-sys (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

but cargo build --release

complie success。

why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions