G
G
Gina Lee2015-09-30 22:52:34
linux
Gina Lee, 2015-09-30 22:52:34

How to compile a sish file through the terminal if you need to set input arguments?

Good luck to everyone :)
How to compile a file (let's say program.c) through the Linux terminal
in the photo is how I tried (but I don’t know how to write the arguments8edfa83859ed48518d166b11ee7a0682.png

#include<stdio.h>
#include <time.h>
#include<io.h>
int main(int argc, char* argv[])
{
  if (argc > 1)
  {
  /*...*/
  }
  else
  {
    /*...*/
  }

  return 0;
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Martyanov, 2015-09-30
@Din7

Have you tried gcc program.c and didn't work?

D
Daemon23RUS, 2015-09-30
@Daemon23RUS

I suspect that the path to the file / file is not correctly specified, what does the command give in your case?
2nd option, file location

#include<stdio.h>
#include <time.h>
#include<io.h>

But in this case, gcc should give the
PS line number, and it would not hurt to specify the output file. But this is all after overcoming the 1st error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question