[NSWI004] Error running make after implementing printk()

Quoc Anh Nguyen nquocanh97 at gmail.com
Sat Oct 10 16:06:40 CEST 2020


Hello,
I have a problem running "make" after modifying the print.c file in
assignment 01. I cloned the a01-LOGIN repository, ran the "configure.py"
script and successfully ran the "make" command. I proceeded to edit
"kernel/src/lib/print.c" and "kernel/include/lib/print.h" to implement my
printk() function.
Then I ran the configure.py script and tried to run "make", but it gave me
this error:

include/lib/print.h:15:14: error: unknown type name 'list_t'
   15 | void print_L(list_t* list);

So I added #include <adt/list.h> to the print.h file. Now "make" gives me
this error:

include/adt/list.h: In function 'link_init':
include/adt/list.h:127:5: error: implicit declaration of function 'assert'
[-Werror=implicit-function-declaration]
  127 |     assert(link != NULL);
      |     ^~~~~~
include/adt/list.h:9:1: note: 'assert' is defined in header '<assert.h>';
did you forget to '#include <assert.h>'?

What am I doing wrong here? I don't suppose I should just include the
assert.h file?
-- 
Nguyen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://d3s.mff.cuni.cz/pipermail/nswi004/attachments/20201010/470afd47/attachment.htm>


More information about the NSWI004 mailing list