Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux Python:在构建Python扩展时向gcc传递自定义参数_Linux_Boost_Boost Python_Boost Build_Bjam - Fatal编程技术网

Linux Python:在构建Python扩展时向gcc传递自定义参数

Linux Python:在构建Python扩展时向gcc传递自定义参数,linux,boost,boost-python,boost-build,bjam,Linux,Boost,Boost Python,Boost Build,Bjam,我需要将-Wl,-rpath,\$$ORIGIN/lib/传递给g++的链接器()。有没有办法在Jamroot文件中传递此参数?要修改linkflags,请使用以下近似值: using gcc : : : <linkflags>"-Wl,-rpath,\\$ORIGIN/lb" ; 使用gcc::“-Wl,-rpath,\\$ORIGIN/lb”; 资料来源:。另一个选项是将其添加到项目的属性中。在根目录的顶部,添加以下规则(或修改预先存在的项目规则) 项目 :要求 gcc:“-

我需要将
-Wl,-rpath,\$$ORIGIN/lib/
传递给g++的链接器()。有没有办法在Jamroot文件中传递此参数?

要修改linkflags,请使用以下近似值:

using gcc : : : <linkflags>"-Wl,-rpath,\\$ORIGIN/lb" ;
使用gcc::“-Wl,-rpath,\\$ORIGIN/lb”;
资料来源:

。另一个选项是将其添加到项目的属性中。在根目录的顶部,添加以下规则(或修改预先存在的
项目
规则)

项目
:要求
gcc:“-Wl,-rpath,\\$ORIGIN/lib”
;
这只会影响本项目的gcc,即使当前的
使用gcc也有效命令是从Jamroot外部调用的(就像在Ubuntu的默认配置中一样)

也许有更好的方法,可以通过修改python for extensions别名Boost.Build链接来调用python extension,但我不知道该怎么做,甚至不知道是否可以做到

project
  : requirements
      <toolset>gcc:<linkflags>"-Wl,-rpath,\\$ORIGIN/lib"
  ;