Frage

The kernel extension I am writing needs to include a framework (DirectIO), so I added the framework in the "Linked Libraries" section of the target properties. I then included it in the main source file.

The problem is, whenever I try to build it, it gives this error:

/Developer/usr/bin/ld_classic: incompatible flag -framework used (must specify "-dynamic" to be used)

I'm using XCode 3.2 on Snow Leopard, building for OSX i386. Is it possible to include a .framework in a .kext target?

War es hilfreich?

Lösung

I don't think you can link with a framework (other than Kernel.framework) or a dynamic library when building a kernel extension.

Your code will run in supervisor mode. LD related stuff is basically not available in that stage.

You may however link with other extensions (/System/Library/Extensions), using your kext's plist file (OSBundleLibraries).

See 'Determine Kext Dependencies' of the Kernel Extension Programming Topics documentation.

There's a lot of I/O related stuff in the available kernel extension. Maybe you'll find there an equivalent.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top