Skip to content

libnautilus: Unknown directive found pragma #5

Closed
@matheusfaustino

Description

@matheusfaustino

Hi, first of all, thank you for your work and your article, I was about to give up about FFI and then I found your article and libs and I'm giving another chance for it.

I am trying to load the nautilus extension with FFIMe, but it throws this error:
Fatal error: Uncaught LogicException: Unknown directive found pragma in ./vendor/ircmaxell/php-c-parser/lib/PreProcessor.php:114

The code I'm running is:

$ffime = (new FFIMe('/usr/lib/x86_64-linux-gnu/libnautilus-extension.so'))
    ->include('/usr/include/nautilus/nautilus-extension.h')
    ->codeGen('nautilus\\extension', __DIR__ . '/nautilius.php');

if I remove the nautilus-extension.h it compiles, but it doesn't generate all the functions. You can find more about here nautilus-extension.h . The actual header doesn't have the preprocessor pragma but the others do.

Could you help me, please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions