如何在Rust中使用不同的libstdc ++。a?

时间:2017-05-24 11:32:07

标签: gcc rust octave rustup

我正在通过生锈使用每晚Rust。我正在尝试为GNU Octave构建一个Windows dll。是否可以使用Octave的libstdc ++。a?

我可以编译,但链接fails with errors如:

C:\Users\camer\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib/libstdc++.a(locale.o):(.text$_ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEy+0x2c): undefined reference to `pthread_mutex_lock'

C:\Users\camer\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib/libstdc++.a(locale.o):(.text$_ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEy+0xa7): undefined reference to `pthread_mutex_unlock'

C:\Users\camer\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib/libstdc++.a(locale.o):(.text$_ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEy+0xde): undefined reference to `pthread_mutex_init'

我目前的预感是找到的libstdc++.a不兼容。它正在使用这种搜索路径顺序找到Rust中的那个:

  1. "-L" "C:\Users\camer\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib"
  2. "-L" "C:\Octave\Octave-4.2.1\lib64\gcc\x86_64-w64-mingw32\4.9.4"
  3. Octave 4.2.1附带的gcc是GCC 4.9.4发布[2016-08-03]。 Rust nightly已发布GCC 6.3 [2016-12-21]。我需要做一些像使用Octave的GCC 4.9.4编译Rust标准库吗?那可能吗?完整代码以及此issue中的更多详细信息。

0 个答案:

没有答案