Ask coding questions

← Back to all posts
How can i change c compiler avail in replit ?
h
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 (860) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (17034)

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

@Coder100

xxpertHacker (860)

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

19ecal (230)
  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 (230)

@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
@19ecal