Estia-1a / projetGenieInfo_public

This is the main repository for the Estia First Year Computer Science Project
MIT License
1 stars 2 forks source link

Bug in original code in template ? #34

Closed dhmmasson closed 2 years ago

dhmmasson commented 2 years ago

The automatic evaluation returns the following issues on the src code from the template...

  /home/runner/work/test-projet-prof-team-prof-last-minute/test-projet-prof-team-prof-last-minute/src/argsparse.c: In function ‘parse_arguments’:
  /home/runner/work/test-projet-prof-team-prof-last-minute/test-projet-prof-team-prof-last-minute/src/argsparse.c:23:24: error: array type has incomplete element type ‘struct option’
     23 |   static struct option long_options[] =
        |                        ^~~~~~~~~~~~
  /home/runner/work/test-projet-prof-team-prof-last-minute/test-projet-prof-team-prof-last-minute/src/argsparse.c:25:17: error: ‘no_argument’ undeclared (first use in this function); did you mean ‘arguments’?
     25 |       {"debug", no_argument,     &debug_mode, 1},
        |                 ^~~~~~~~~~~
        |                 arguments
  /home/runner/work/test-projet-prof-team-prof-last-minute/test-projet-prof-team-prof-last-minute/src/argsparse.c:25:17: note: each undeclared identifier is reported only once for each function it appears in
  /home/runner/work/test-projet-prof-team-prof-last-minute/test-projet-prof-team-prof-last-minute/src/argsparse.c:28:17: error: ‘required_argument’ undeclared (first use in this function)
     28 |       {"file",  required_argument, 0, 'f'},
        |                 ^~~~~~~~~~~~~~~~~
  /home/runner/work/test-projet-prof-team-prof-last-minute/test-projet-prof-team-prof-last-minute/src/argsparse.c:36:11: warning: implicit declaration of function ‘getopt_long’ [-Wimplicit-function-declaration]
     36 |       c = getopt_long (argc, argv, "f:c:v:", long_options, &option_index);
        |           ^~~~~~~~~~~
  make[2]: *** [CMakeFiles/freud.dir/build.make:76: CMakeFiles/freud.dir/src/argsparse.c.o] Error 1
dhmmasson commented 2 years ago

Pull Request: Estia-1a/test-projet-prof-team-prof-last-minute#27 fix this It just missing #include in argparse.c