common.h: no such file or directory : Ubuntu [clos

2019-03-07 07:52发布

问题:

I am trying to compile a program(in OpenGL) in Ubuntu, but I am receiving this error

fatal error: common.h: No such file or directory

I am not sure on which package I need to install for this.

回答1:

common.h is not part of any package. I suspect you took the code out of some project or a tutorial that was part of a whole set of programs. And common.h is a header common to all those projects.



回答2:

If you arrive at this page, it's possibly because your going through the 'Introduction to Operating Systems' book and tried to copy the code from the intro chapter directly and compile. At least, that's why I ended up here. This won't work, and will throw the above error.

It's best to download the code directly from the source and compile what they give you. Enjoy!