home -> linux -> kernel

Linux Kernel Programming Errors

common mistakes and errors
Error Possible Solution
error: dereferencing pointer to incomplete type A struct which has never been defined is being accessed. This probably means the needed header was omitted. Double check the line where the compile error was shown to see that all of the structs have been defined/included.
error: syntax error before 'if' (or) error: syntax error before 'for' A very common reason for this error is that the line before this has was not closed with a semicolon ';'. In general look for extra or missing characters on the reported line and the lines just before and after.