[Mingw-users] linker error

Back to archive index
HAROLD ROSENKRANS im_halro****@msn*****
Sat Jul 18 11:39:46 JST 2020


Hello – I am on a Windows 10,64-bit machine. I installed the MinGW basic installation.

When I tried to compile my first hello world program from the command line.

#include <stdio.h>

int main() {

           printf("Hello, This is cool! \n");

           return 0;
}

D:\java\gcc HelloWorld.c -o D:\java\Hello.exe

no executable. I tried it first with -o Hello.exe, same result

The compiler acts like it’s doing something, no errors but no output. So I ran it with the -v switch and got (among other things)

d:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot open output file Hello.exe: Permission denied

I am running the command shell as administrator (full control rights)

Not sure what the problem is – been searching around the web for a bit.

Thanks
Harold

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/mingw-users/attachments/20200718/d4831cb6/attachment.html>


More information about the MinGW-Users mailing list
Back to archive index