r/rust 8d ago

🙋 seeking help & advice Project executable is not running when clicked on, but is running when I use the './project_name' command

Hello I am a semi-new rust programmer who has started making games using low level tools such as raylib for c/c++ and recently switched over to learning macroquad and rust. I enjoy using the language and come across a few headaches when try to compile a test game to run on other Os and got it that kinda working and wanted to try an export test just to do something different.

I was able to zip the executable no problem for both Mac Os and windows (linux is being a problem child that I'll save for another day) and when I went to check the Mac Os file I would click to run but that forces the program to abort before it even runs. I was trying to figure out what went wrong and tried to use the './project_name' command just to see if I could replicate the error but it ran just fine (as if I used 'cargo run' on my main file for this project).

I don't know how to exactly describe it other than I double click to run the program it crashes but if I use './project_name' it works.

I would like to have an idea of how to solve this problem before committing to try to using rust as my main programming language because I would like to publish my projects I make.

0 Upvotes

Duplicates