Example for loading image from path, from native library (shared) or from data (embedded resource)
-
Compile with TestEmbedLibrary: Change directory
cd TestEmbedLibrary
Type with dotnet program:
dotnet publish -c Release -r linux-x64 -p:NativeLib=Shared --self-contained
Find and get nativelibrary:
cd bin/Release/net8.0/linux-x64/native
List:
ls *.so
Result:
Copy
TestEmbedLibrary.so
todata
directory:copy TestEmbedLibrary.so ../../../../../../TestEmbedResources/data
-
Compile with TestEmbedResources:
Change directory to
TestEmbedResources
:cd ../../../../../../TestEmbedResources dotnet build -c Release dotnet run -c Release
Result:
If it is okay then you can publish as native executable file:
dotnet publish -c Release -r linux-x64 --self-contained
Copy data from aoutput (
bin/Release/net8.0/linux-x64
) directory to native directory:It looks like that:
Click
TestEmbedResources
That is all for C# and loading from native library ( shared )
I would like to say thank you for understanding and caring my idea!
If you want to spend any money - Sorry I use only Crypto! Don't worry about bad memory! It is seriously! Please note me if you already send me via crypto ( TRX or MATIC ) then you send your proof me email jenspetereckervogt[at]gmail[dot}com - Thank you!
MATIC ( Polygon ): 0x017a8d27d8c3cb7f8b7bc901f74d10fc2eb59e57
TRX ( Tron ): TLoCs2APXMfvRc3fbq52vquVtUc52pu1bG
Thanks for supporting my work!