I am trying to set up Solana to Windows 10, when I run the "cargo test" command after build, I get an error message like:
error[E0433]: failed to resolve: could not find `unix` in `os`
--> geyser-plugin-manager\src\geyser_plugin_manager.rs:395:43
|
395 | Library::from(libloading::os::unix::Library::this()),
| ^^^^ could not find `unix` in `os`
|
help: consider importing one of these items
|
380 + use crate::geyser_plugin_manager::Library;
|
380 + use libloading::Library;
|
380 + use libloading::os::windows::Library;
|
help: if you import `Library`, refer to it directly
|
395 - Library::from(libloading::os::unix::Library::this()),
395 + Library::from(Library::this()),
|
This part is in geyser_plugin_manager.rs file, the related code part:
pub(super) fn dummy_plugin_and_library<P: GeyserPlugin>(
plugin: P,
config_path: &'static str,
) -> (Box<dyn GeyserPlugin>, Library, &'static str) {
(
Box::new(plugin),
Library::from(libloading::os::windows::Library::this()),
config_path,
)
}
When I changed this line with
Library::from(Library::this()),
I get this error:
error[E0599]: no function or associated item named `this` found for struct `libloading::Library` in the current scope
--> geyser-plugin-manager\src\geyser_plugin_manager.rs:395:36
|
395 | Library::from(Library::this()),
| ^^^^ function or associated item not found in `Library`
In addition, When I try
Library::from(libloading::os::windows::Library::this()),
I get this error:
Type mismatch
[E0308] expected `libloading::os::windows::Library`, but found `Result<libloading::os::windows::Library, Error>`
How can I fix it?