I try to use the kernel framework to modify the MSR-register within my system. The issue is that the linker does not find some headers which are in the framework itself. I'm using Xcode 11.1 and the project is in C++.
So my hypothesis, is that in the framework they import and not therefor the linker tries to look in the system header directory after the header and not in the framework. As libkern does exist just in the header directory of Xcode, but not all headers (such as crc.h) are present. I tried to just copy-past the headers from the framework, but then it complains about other headers which has the same issue (in the framework but not in xcode-headers).
So I think the answer should be trying to tell the linker to look for headers within the framework before trying the system headers.
I also tried to install the Xcode command line tool, which seems to make a lot of problem with the headers with osx 10.14 and try to install the headers as lot of other post suggested. But the pkg does not exist, so I assume they remove it with osx 10.15.
Well as I don't have enough reputation for images here are the links to the screenshots:
- Header within the framework giving the issue: https://imgur.com/rpkDOJ7
- General libraries setting: https://imgur.com/TVtoFai
- The added libraries to the build phases: https://imgur.com/S3vcIU9
So I would like to use this framework without having issues. But if I have a command to read and write to the MSR_IA32_MISC_ENABLE, I will be happy. (And maybe other MSR's in the future).