Recently, I have been wicked. I have run several `actix` projects, and it prompts `Process startup failed: unknown error`

project address:

2021-5-6 11:13:45
I found that the same is true for compiling another project.
https://www.reddit.com/r/actix/comments/n5xv9x/recently_there_has_been_process_launch_failed/

Windows 10.

println!("start!") is not executed. What is the situation?

Google searched for similar problems, but I still don't know how to solve this problem.

I use Clion.

Are you sure you copied those examples correctly?

print isa macro, and as such it must end with an exclamation mark to be valid syntax: print!("Starting program")

It should probably println!("start!"); not print("start!"); or print!("start!");. print doesn't write a trailing newline and because stdout is line buffered, this means that nothing is actually written to the terminal until a newline.

@bjorn3 @moy2010 I accidentally made a mistake. It’s a little strange that if you make a mistake, doesn’t it mean that the compilation has failed? Why compile? Do you have a Win10 computer? Try to compile?
Changing to println still has problems.

From what I can tell the Rust compiler created an exe file successfully. It's the IDE and/or its debugger trying to use it that is causing an error.

I would check whatever configuration settings the IDE is using. In VSCode this would be in .vscode. Maybe just remove whatever isn't working and try to start fresh with a minimal config. You might also find a better error message in the output of the debugger.

I don't use CLion but I understand those JetBrains IDEs have support channels for customers. They or their community might be of more help.

@Rustaceous

One thing I found was that I ran the compiled program directly, and there was no output, not even the first line of code.

I found out the reason,

First execute cargo run

D:\rust_project\actix_example\basics\todo>cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.64s
Running D:\rust_project\actix_example\target\debug\actix-todo.exe
error: process didn't exit successfully: D:\rust_project\actix_example\target\debug\actix-todo.exe (exit code: 0xc0000
135, STATUS_DLL_NOT_FOUND)

Open the directory where the exe is located, D:\rust_project\actix_example\target\debug\ According to STATUS_DLL_NOT_FOUND , it is because the dll cannot be found, so it cannot be opened. Then double-click to run the exe directly, the prompt is as follows

1

Then find this file and put it into the directory where the exe is located.

1 Like

It looks like whichever crate tries to use libintl-8.dll (possibly some wrapper around gettext) hasn't told rustc how to link to it properly. I'd create a ticket against their issue tracker because they probably need to add some println!("cargo:rustc-link-lib=intl-8") calls to their build.rs.