Can't run executable built with Dub - OS thinks it is shared library

Stephen C schatelain at
Wed Oct 27 19:48:14 UTC 2021

On Wednesday, 27 October 2021 at 19:16:29 UTC, Paul Backus wrote:
> Which Linux distribution are you using, and which file 
> browser/desktop environment are you using when you attempt to 
> run the program by clicking on it?

Linux Mint 20.2 with XFCE4 and Thunar file manager.
I think you're right - it seems to be a problem with Thunar (and 
possibly other file managers in Linux).

 From a bug report I just found:
_An application built with the "-PIE" flag will be seen as a 
"application/x-sharedlib" mime type unless the user explicitly 
uses the "-nopie" link flag. When attempting to open the 
application, Thunar will ask the user what application to use - 
even though it's an application._

I assume this also happens with the "-PIC" flag. But is there any 
way to run DMD without the -fPIC flag (set in dmd.conf)? I tried 
to remove it, but then it won't compile at all.

More information about the Digitalmars-d mailing list