Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22199

How can i fix the "The specified executable is not a valid application for this OS platform." in vscode for c++ [closed]

$
0
0

I have recently moved to VScode so chances are I am doing something very dumb, when I run my code using VScode run/debug button on the top right my code runs but when I try to compile and run my code from the terminal I get errors.here i included the example code i used:

#include <iostream>int main(){std::cout << "hello";return 0;

}

my main issue begins with the following command

gcc -c hello.cpp -o hello.exe

and when I run

./hello.exe 

i get the following error

        Program 'hello.exe' failed to run: The specified executable is not a valid application for this OS platform.At line:1 char:1 ./hello.exe ~~~~~~~~~~~.At line:1 char:1 ./hello.exe ~~~~~~~~~~~+ CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException+ FullyQualifiedErrorId : NativeCommandFailed

I believe both the compiler I have and my system are both 64bit and besides that I cannot fathom what "The specified executable is not a valid application for this OS platform" can mean. (i checked with -dumpspecs and under *multilib_defaults it says m64)

I would appreciate any help and guidance


Viewing all articles
Browse latest Browse all 22199

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>