Ask coding questions

← Back to all posts
How can i change c compiler avail in replit ?
innovatorved (0)

In and repl if i work with two or more c files the compiler not work Output not shown
it only works properly if i am working with single main.c file

Answered by xxpertHacker (930) [earned 5 cycles]
View Answer
Coder100 (18187)

Make a .replit file instead, replit thinks that you are trying to include BOTH files in the same project instead of two different projects. Or you can just make a new repl instead

innovatorved (0)

then in this case no output shown in console


xxpertHacker (930)

@innovatorved You aren't executing the compiled code afterwards, is that intentional?

19ecal (232)
  1. It's <stdio.h> (main.c)
  2. To run fcs-cpu-scheduling.c when you hit run, make a file named .replit and in it put this
run="gcc -o fcs-cpu-scheduling fps-cpu-scheduling.c; ./fcs-cpu-scheduling

That will compile and run the file when you hit the run button

innovatorved (0)

can you please recheck your command
'run="gcc -o fcs-cpu-scheduling fps-cpu-scheduling.c; ./[email protected] '

19ecal (232)

@innovatorved It's meant to say fcs-cpu-scheduling three times, just copy and paste it it should work

innovatorved (0)

Can You give me the screenshot