title: How to solve "unrecognized command line option '-std=gnu11'" error?
body: <p>I am planning to run a TCP client using C with Eclipse and here is the code. I added the output as well. Any ideas why I get the following output?</p>
  
  <pre><code>#include &lt;winsock2.h&gt;
  #include &lt;stdio.h&gt;      /* for printf(), fprintf() */
  #include &lt;stdlib.h&gt;     /* for exit() */
  
  int main(int argc, char**argv)
  {
     int sockfd,n;
     struct sockaddr_in servaddr,cliaddr;
     char sendline[1000];
     char recvline[1000];
  
     if (argc != 2)
     {
        printf("usage:  client &lt;IP address&gt;\n");
        exit(1);
     }
  
     sockfd=socket(AF_INET,SOCK_STREAM,0);
  
     bzero(&amp;servaddr,sizeof(servaddr));
     servaddr.sin_family = AF_INET;
     servaddr.sin_addr.s_addr=inet_addr(argv[1]);
     servaddr.sin_port=htons(32000);
  
     connect(sockfd, (struct sockaddr *)&amp;servaddr, sizeof(servaddr));
  
     while (fgets(sendline, 10000,stdin) != NULL)
     {
        sendto(sockfd,sendline,strlen(sendline),0,
               (struct sockaddr *)&amp;servaddr,sizeof(servaddr));
        n=recvfrom(sockfd,recvline,10000,0,NULL,NULL);
        recvline[n]=0;
        fputs(recvline,stdout);
     }
  }
  ///////////////////////////////////////////////////////////////////////////////////
  </code></pre>
  
  <p>and here the output:</p>
  
  <pre><code>*****11:25:59 **** Incremental Build of configuration Debug for project tcpcli ****
  Info: Internal Builder is used for build
  gcc -O0 -g3 -Wall -c -fmessage-length=0 -std=gnu11 -o tcpclient.o "..\\tcpclient.c" 
  cc1.exe: error: unrecognized command line option '-std=gnu11'*****
  </code></pre>