Gcc compiles stuff as a shared library instead of an executable [on hold]
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++
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.
add a comment |
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++
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? Doesldd 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
add a comment |
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++
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++
gcc c++
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? Doesldd 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
add a comment |
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? Doesldd 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
add a comment |
0
active
oldest
votes
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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