rodframeh / csharp-uber-h3-and-dynamic-library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Un C# binding a Uber H3 C biblioteca

Problema

  • DllNotFoundException: Unable to load shared library ... (En linux utilizando netcore 2.2 y 3.1)

Compilar Uber H3

  • Se debe crear una carpeta para compilar el proyecto H3, ejemplo: /build, y dentro de la carpeta /build ejecutar los comandos para compilar.
  • Para compilar H3 en windows, genera un .dll en la carpeta /bin
cmake -A x64 -DBUILD_SHARED_LIBS=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release ../h3
cmake --build . --target h3 --config Release
  • Para compilar H3 en linux, genera un .so.1 en la carpeta /lib
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release ../h3
cmake --build . --target h3 --config Release

Referencias

Dynamic loading of native code with .NET H3Standard: A c# binding to Uber H3 C library Interacting with native libraries in .NET Core 3.0 Mercury Particle Sandbox

About


Languages

Language:C# 100.0%