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

gcc on Windows: generated "a.exe" file vanishes

$
0
0

I'm using GCC version 4.7.1, but I've also tried this on GCC 4.8. Here is the code I'm trying to compile:

#include <stdio.h>

void print(int amount) {
    int i;
    for (i = 0; i < 5; i++) {
        printf("%d", i);
    }
}

int main(int argc, char** argv) {
    print(5);
    return 0;
}

It looks like it should work, and when I compile with...

gcc main.c

It takes a while to compile, produces an a.exe file and the the a.exe file disappears. It isn't giving me any errors with my code.

Here's a gif of proof, as some people are misinterpreting this: proof


Viewing all articles
Browse latest Browse all 22117

Trending Articles



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