我如何使用wxWidgets的私有安装

时间:2022-05-13 11:24:05

I have two installations of wxWidgets, one in /usr/... and one private. I don't have permissions to change the central directory. My question is how can i make my private installation the active one?

我有两个wxWidgets安装,一个在/ usr / ...和一个私有。我没有权限更改*目录。我的问题是如何让我的私人安装成为活动安装?

If i only add it to the PATH setenv, it dosn't work correctly since i'm missing the LIBS.

如果我只将它添加到PATH setenv,它不能正常工作,因为我错过了LIBS。

1 个解决方案

#1


1  

The usual way to do something like that is to add the folder with your "private" libs to your LD_LIBRARY_PATH environment variable (assuming you're using bash and your shared libraries are in "/home/myLogin/wxWidgets/lib"),

执行此类操作的常用方法是将包含“私有”库的文件夹添加到LD_LIBRARY_PATH环境变量中(假设您正在使用bash并且您的共享库位于“/ home / myLogin / wxWidgets / lib”中),

export LD_LIBRARY_PATH="/home/myLogin/wxWidgets/lib:$LD_LIBRARY_PATH"

From The Linux Documentation Project - 3.3.1. LD_LIBRARY_PATH

来自Linux文档项目 - 3.3.1。 LD_LIBRARY_PATH

You can temporarily substitute a different library for this particular execution. In Linux, the environment variable LD_LIBRARY_PATH is a colon-separated set of directories where libraries should be searched for first, before the standard set of directories

您可以临时替换其他库以执行此特定执行。在Linux中,环境变量LD_LIBRARY_PATH是以冒号分隔的目录集,其中应首先在标准目录集之前搜索库。

#1


1  

The usual way to do something like that is to add the folder with your "private" libs to your LD_LIBRARY_PATH environment variable (assuming you're using bash and your shared libraries are in "/home/myLogin/wxWidgets/lib"),

执行此类操作的常用方法是将包含“私有”库的文件夹添加到LD_LIBRARY_PATH环境变量中(假设您正在使用bash并且您的共享库位于“/ home / myLogin / wxWidgets / lib”中),

export LD_LIBRARY_PATH="/home/myLogin/wxWidgets/lib:$LD_LIBRARY_PATH"

From The Linux Documentation Project - 3.3.1. LD_LIBRARY_PATH

来自Linux文档项目 - 3.3.1。 LD_LIBRARY_PATH

You can temporarily substitute a different library for this particular execution. In Linux, the environment variable LD_LIBRARY_PATH is a colon-separated set of directories where libraries should be searched for first, before the standard set of directories

您可以临时替换其他库以执行此特定执行。在Linux中,环境变量LD_LIBRARY_PATH是以冒号分隔的目录集,其中应首先在标准目录集之前搜索库。