r/C_Programming • • Sep 29 '26

Could not Compile

I used gcc to compile and run c file.

C prog file can be compile and run with no error, if the files are inside the same drive as gcc that is c: drive.

Program file inside the d: drive are not compile.

I just curious whether i made mistake or i need something to do.

0 Upvotes

14 comments sorted by

View all comments

Show parent comment

1

u/dkopgerpgdolfg Sep 29 '26

And what exact command was used

1

u/Vivid_Employment_950 Sep 29 '26

gcc .\hello.c -o .\hello

2

u/SmokeMuch7356 Sep 29 '26

What error message do you get from the compiler?

1

u/This_Growth2898 Sep 29 '26

This is a UNIX command. UNIX doesn't have C: or D: drives.