habemus-papadum / kernel-grok

grok the kernel via a cmake shim
181 stars 32 forks source link

Error "Cannot find source file: *.mod.c" occurred when Clion loading CMakeList.txt #4

Closed wakakalu closed 5 years ago

wakakalu commented 5 years ago

Hello, After I followed these steps offered in README, I got my CMakeList.txt. I put the CMakeList.txt into Clion and Clion loaded it but failed. Clion indicated that "Cannot find source file: net/netfilter/xt_mark.mod.c" and it just didn't exist in the source code. So I analyzed the problem and I found files with .mod.c postfix also existed in compile_commands.json. They may generate after the source code was compiled. Is there any way to deal with this problem?

wakakalu commented 5 years ago

I find it's a good idea to use the compiled source code instead of the original source code downloaded from the network. Then, it seems that the problem has been solved.

liangxianlong commented 4 years ago

How do you reslove this problem? @ wakakalu