Gcc compiles stuff as a shared library instead of an executable [on hold]












0















I am trying to compile this program in gcc, I type into my terminal gcc main.cpp -o corrupt -std=c++11 it compiles, I go to the file and it is a shared library instead of an executable.










share|improve this question













put on hold as unclear what you're asking by Rui F Ribeiro, Kusalananda, Mr Shunz, X Tian, Christopher 5 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
















  • Does it run? I don't fully understand this myself (not having worked too much with C/C++), but on my system, lots of files are shared objects (like Neovim, tar, Firefox) but I can execute them. Maybe this is just how GCC does some things. So it might not be a problem.

    – an actual toaster
    16 hours ago











  • Check this one unix.stackexchange.com/q/348983/255251

    – P_Yadav
    16 hours ago











  • What error do you get when you try to run it? Does ldd yourexecutable show any errors?

    – Mark Plotnick
    14 hours ago











  • I suspect you're experiencing this bug PIE executables (e.g. /usr/bin/ls) are detected as application/x-sharedlib - see also Impossible to launch graphic executables in nautilus

    – steeldriver
    8 hours ago
















0















I am trying to compile this program in gcc, I type into my terminal gcc main.cpp -o corrupt -std=c++11 it compiles, I go to the file and it is a shared library instead of an executable.










share|improve this question













put on hold as unclear what you're asking by Rui F Ribeiro, Kusalananda, Mr Shunz, X Tian, Christopher 5 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
















  • Does it run? I don't fully understand this myself (not having worked too much with C/C++), but on my system, lots of files are shared objects (like Neovim, tar, Firefox) but I can execute them. Maybe this is just how GCC does some things. So it might not be a problem.

    – an actual toaster
    16 hours ago











  • Check this one unix.stackexchange.com/q/348983/255251

    – P_Yadav
    16 hours ago











  • What error do you get when you try to run it? Does ldd yourexecutable show any errors?

    – Mark Plotnick
    14 hours ago











  • I suspect you're experiencing this bug PIE executables (e.g. /usr/bin/ls) are detected as application/x-sharedlib - see also Impossible to launch graphic executables in nautilus

    – steeldriver
    8 hours ago














0












0








0








I am trying to compile this program in gcc, I type into my terminal gcc main.cpp -o corrupt -std=c++11 it compiles, I go to the file and it is a shared library instead of an executable.










share|improve this question














I am trying to compile this program in gcc, I type into my terminal gcc main.cpp -o corrupt -std=c++11 it compiles, I go to the file and it is a shared library instead of an executable.







gcc c++






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 16 hours ago









Love HartLove Hart

33




33




put on hold as unclear what you're asking by Rui F Ribeiro, Kusalananda, Mr Shunz, X Tian, Christopher 5 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






put on hold as unclear what you're asking by Rui F Ribeiro, Kusalananda, Mr Shunz, X Tian, Christopher 5 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.















  • Does it run? I don't fully understand this myself (not having worked too much with C/C++), but on my system, lots of files are shared objects (like Neovim, tar, Firefox) but I can execute them. Maybe this is just how GCC does some things. So it might not be a problem.

    – an actual toaster
    16 hours ago











  • Check this one unix.stackexchange.com/q/348983/255251

    – P_Yadav
    16 hours ago











  • What error do you get when you try to run it? Does ldd yourexecutable show any errors?

    – Mark Plotnick
    14 hours ago











  • I suspect you're experiencing this bug PIE executables (e.g. /usr/bin/ls) are detected as application/x-sharedlib - see also Impossible to launch graphic executables in nautilus

    – steeldriver
    8 hours ago



















  • Does it run? I don't fully understand this myself (not having worked too much with C/C++), but on my system, lots of files are shared objects (like Neovim, tar, Firefox) but I can execute them. Maybe this is just how GCC does some things. So it might not be a problem.

    – an actual toaster
    16 hours ago











  • Check this one unix.stackexchange.com/q/348983/255251

    – P_Yadav
    16 hours ago











  • What error do you get when you try to run it? Does ldd yourexecutable show any errors?

    – Mark Plotnick
    14 hours ago











  • I suspect you're experiencing this bug PIE executables (e.g. /usr/bin/ls) are detected as application/x-sharedlib - see also Impossible to launch graphic executables in nautilus

    – steeldriver
    8 hours ago

















Does it run? I don't fully understand this myself (not having worked too much with C/C++), but on my system, lots of files are shared objects (like Neovim, tar, Firefox) but I can execute them. Maybe this is just how GCC does some things. So it might not be a problem.

– an actual toaster
16 hours ago





Does it run? I don't fully understand this myself (not having worked too much with C/C++), but on my system, lots of files are shared objects (like Neovim, tar, Firefox) but I can execute them. Maybe this is just how GCC does some things. So it might not be a problem.

– an actual toaster
16 hours ago













Check this one unix.stackexchange.com/q/348983/255251

– P_Yadav
16 hours ago





Check this one unix.stackexchange.com/q/348983/255251

– P_Yadav
16 hours ago













What error do you get when you try to run it? Does ldd yourexecutable show any errors?

– Mark Plotnick
14 hours ago





What error do you get when you try to run it? Does ldd yourexecutable show any errors?

– Mark Plotnick
14 hours ago













I suspect you're experiencing this bug PIE executables (e.g. /usr/bin/ls) are detected as application/x-sharedlib - see also Impossible to launch graphic executables in nautilus

– steeldriver
8 hours ago





I suspect you're experiencing this bug PIE executables (e.g. /usr/bin/ls) are detected as application/x-sharedlib - see also Impossible to launch graphic executables in nautilus

– steeldriver
8 hours ago










0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Loup dans la culture

How to solve the problem of ntp “Unable to contact time server” from KDE?

Connection limited (no internet access)