You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm helping out with an indie game which is built on .NET 4.6.1 and is trying its best to support Linux. Recently I found out that native libraries that were available for different architectures, and therefore stored in two different folders Lib32 and Lib64, were not able to be loaded from these paths.
In #monovm on the DotNetEvolution Discord I was recommended to use LD_LIBRARY_PATH to specify which of the folders to load libraries from. This works well when I change the game's launch script:
if [ $(uname -m)=='x86_64' ];then ARCH=64;else ARCH=32;fiexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/share/<game>/Lib$ARCHexec /usr/bin/mono /usr/share/<game>/<executable>.exe
However, when trying to do something similar in the launch.json, the game still fails to find the library.
I can confirm using Environment.GetEnvironmentVariable that the variable has been set correctly, but it appears that this environment variable is only set in the context of the program itself, rather than the mono binary, which (from my understanding) in charge of loading native libraries.
Is it possible to pass environment variables to the mono executable itself when debugging?
(Note: In the released game, the library folder is called "Lib64", while when debugging from source, it's "lib64", so in case you noticed that, it's not actually a typo, just a bit of an odd decision from the core developers who develop on Windows.)
The text was updated successfully, but these errors were encountered:
I'm helping out with an indie game which is built on .NET 4.6.1 and is trying its best to support Linux. Recently I found out that native libraries that were available for different architectures, and therefore stored in two different folders
Lib32
andLib64
, were not able to be loaded from these paths.In #monovm on the DotNetEvolution Discord I was recommended to use
LD_LIBRARY_PATH
to specify which of the folders to load libraries from. This works well when I change the game's launch script:However, when trying to do something similar in the
launch.json
, the game still fails to find the library.I can confirm using
Environment.GetEnvironmentVariable
that the variable has been set correctly, but it appears that this environment variable is only set in the context of the program itself, rather than the mono binary, which (from my understanding) in charge of loading native libraries.Is it possible to pass environment variables to the mono executable itself when debugging?
(Note: In the released game, the library folder is called "Lib64", while when debugging from source, it's "lib64", so in case you noticed that, it's not actually a typo, just a bit of an odd decision from the core developers who develop on Windows.)
The text was updated successfully, but these errors were encountered: