C programing Makefile in linux -


Can not I blame anyone, I'm not sure what's wrong I think I'm doing something wrong Makefile cuz can run it I get error

Program: drevoProcesov.c`

  #include & lt; Sys / types.h & gt; Include `# & lt; Sys / wait.h & gt; # Include & lt; Unistd.h & gt; # Include & lt; Stdlib.h & gt; #include & lt; Stdio.h & gt; 'Zero-less' () {printf ("PID:% d PPID:% d \ n", getpid (), getppid ()); } Ent Main (ET argc, char * argv []) {/ * levo * / if (fork () == 0) {if (fork () == 0) {if (fork () == 0} {izpis (); Exit (0); } And wait (0); izpis ();} exit (0);} and (wait (0); wait (0); wait (0); izpis ();}} / * desno * / Else {wait (0); if (fork () == 0) {if (fork () == 0) {izpis (); exit (0);} and (wait (0); if ( Fork () == 0) {izpis (); exit (0);} and (wait (0); if (fork () == 0) {izpis (); exit (0);} And wait (0); izpis ();}}} exit (0);} and (wait (0); izpis ();}} return 0;   

TARGET) Clean: RM-RF $ (TARGET) RM-RF * .o

This is an error for me: drevoProcesov.c

  ./ DrevoProcesov.c: Line 7: Syntax error near unexpected token `('./drevoProcesov.c : Line 7: Include `zero izpis () '  

Program 2 vsotast.c

  #include  & Lt; stdlib.h & gt; # Include & lt; sys / types.h & gt; #include & lt; unistd.h & gt; #include & lt; sys / wait.h & gt; int * vsota ; Int main (int argc, char * argv []) {if (argc! = 2) {printf ("Napaka v podajanju argumentov! \ N Primary: ./vsotast 5 \ n"); Return -1;} int n = atoe (agre [1]); VioTa = (int *) maulok (size); * Vitaota = 0; Int rate; (Int i = 0; i & lt; n; i ++) (); If (rate == 0) {* vsota = (* vs + + (i + 1)); // printf ("VSATA:% D; I + 1:% D \ n", * Violeta, I + 1); / * If (i == n-1) printf ("Vesota, of which isara Umalali sinovi:% d \ n", * create); * / Exit (0);} and {Wait (& Amp ;;;}}}} sum = ((n * (1 + n)) / (2)); The printf ("whoest, ki bijaraa: anali sinovi: v% d \ n", * viota); Printf ("whootah, ki azaraa: oye dew:% d \ n", yoga); Free (vsota); Return 0; }   

MAKEFILE 2

  CC = GCC LDFALGS = -LM-G3-LPThread -VL CFLAG = -gag = vsotast all: $ (target) Clear: RM-RF $ (Target) RM-RF *. O   

This error I get: vsotast.c

  GCC-G - Lm-g3 -lpthread -Wall vsotast.c -o Virat Vsotast.c: Function mainly: vsotast.c: 22: 4: Error: Loop initial announcements for each other only in C99 mode (int i = 0; i    

This vsotast.c error is due to the fact that announcements before the C99 loop expression You do not have permission to type in code, so you need to enable CMAM mode or exit for expression:

  int i; (I = 0; i & lt; n; i ++)    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -