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
Compiling glfw v0.41.0 (/home/itt/rust2/glfw-rs)
error[E0601]: main function not found in crate window_icon
--> examples/window_icon.rs:15:1
|
15 | / #![cfg(feature = "image")]
16 | |
17 | | extern crate glfw;
18 | | extern crate image;
... |
57 | | }
58 | | }
| |_^ consider adding a main function to examples/window_icon.rs
error: aborting due to previous error
For more information about this error, try rustc --explain E0601.
error: could not compile glfw.
warning: build failed, waiting for other jobs to finish...
error[E0601]: main function not found in crate cursor_icon
--> examples/cursor_icon.rs:15:1
|
15 | / #![cfg(feature = "image")]
16 | |
17 | | extern crate glfw;
18 | | extern crate image;
... |
57 | | }
58 | | }
| |_^ consider adding a main function to examples/cursor_icon.rs
error[E0601]: main function not found in crate vulkan
--> examples/vulkan.rs:15:1
|
15 | / #![cfg(feature = "vulkan")]
The text was updated successfully, but these errors were encountered:
I have faced the same problem. I tried to change code and differend cargo settings and eventually discovered how to fix it.
The secret is to include --features vulkan (or any other required feature) into cargo command. it also works if cfg macro is not used in code.
Compiling glfw v0.41.0 (/home/itt/rust2/glfw-rs)
error[E0601]:
main
function not found in cratewindow_icon
--> examples/window_icon.rs:15:1
|
15 | / #![cfg(feature = "image")]
16 | |
17 | | extern crate glfw;
18 | | extern crate image;
... |
57 | | }
58 | | }
| |_^ consider adding a
main
function toexamples/window_icon.rs
error: aborting due to previous error
For more information about this error, try
rustc --explain E0601
.error: could not compile
glfw
.warning: build failed, waiting for other jobs to finish...
error[E0601]:
main
function not found in cratecursor_icon
--> examples/cursor_icon.rs:15:1
|
15 | / #![cfg(feature = "image")]
16 | |
17 | | extern crate glfw;
18 | | extern crate image;
... |
57 | | }
58 | | }
| |_^ consider adding a
main
function toexamples/cursor_icon.rs
error[E0601]:
main
function not found in cratevulkan
--> examples/vulkan.rs:15:1
|
15 | / #![cfg(feature = "vulkan")]
The text was updated successfully, but these errors were encountered: