You are not logged in.

#26 2018-02-21 16:52:00

spwork
Member
Registered: 2018-02-21
Posts: 19

Re: [SOLVED]How to generate a real linux executable file

Trilby wrote:
spwork wrote:

gcc test.c
./a.out can run
but can't run in visual file manager, it show a window says "could not display a.out There is no application installed for 'shared library' files.....",
gcc -no-pie test.c
./a.out can run
it also can run in visual file manager

Ah, thank you.  Now you've actually described the problem.  This example does suggest a problem with the file manager you are using.  But before you ditch it, I'd suggest a slightly improved test, instead of trying to run a.out, properly compile/link the program:

gcc -o test test.c

Then `test` (not a.out) should still definitely run from ther terminal but the real test is whether your file manager still gives that error message that no application is installed for the file type.  I'm not sure if this would make any difference, but trying to run `a.out` is a bit odd, the file manager may take issue with the .out extension for all we know.

gcc -o test test.c
./test can run
but file manager can't run ,is says"could not display test There is no application installed for 'shared library' files....."

Offline

#27 2018-02-21 16:53:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED]How to generate a real linux executable file

Ok, then *this* is a legitimate issue with the file manager.  I'd report it as a bug to the file manager devs - and try a different file manager.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#28 2018-02-21 17:02:05

spwork
Member
Registered: 2018-02-21
Posts: 19

Re: [SOLVED]How to generate a real linux executable file

Trilby wrote:

Ok, then *this* is a legitimate issue with the file manager.  I'd report it as a bug to the file manager devs - and try a different file manager.

Thanks.

Offline

#29 2018-02-21 19:43:07

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED]How to generate a real linux executable file

So, uh, the problem is that your file browser is attempting to open the file using XDG mimetypes rather than considering it an executable suitable for opening via execv(3)? This is why double-clicking in the file browser and using the default option of I don't even know what, is not how you do things (unless you want to be frustrated).

But generally speaking as long as a file has the executable bit set, your file browser should have a way to select "run in terminal | display | run | cancel" or some such.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB