Skip to content

Linux: no Cairo renderer since #7889 (ofBeginSaveScreenAsPDF / SVG missing, pdfExample doesn't compile) #8608

Closed

Description

@danoli3

Since #7889, ofCairoRenderer.h / .cpp and ofGraphicsCairo.h / .cpp are wrapped in #if defined(OF_CAIRO), but ofConstants.h defines OF_CAIRO only for TARGET_WIN32 and macOS, not TARGET_LINUX. So on Linux the Cairo renderer and ofBeginSaveScreenAsPDF / ofEndSaveScreenAsPDF / ofBeginSaveScreenAsSVG / ofEndSaveScreenAsSVG compile to nothing, even though the Linux makefiles still link Cairo (PLATFORM_PKG_CONFIG_LIBRARIES += cairo). This is in 0.12.1 too.

examples/input_output/pdfExample fails on Linux:

src/ofApp.cpp:33:17: error: 'ofBeginSaveScreenAsPDF' was not declared in this scope
src/ofApp.cpp:125:17: error: 'ofEndSaveScreenAsPDF' was not declared in this scope

Seen on Ubuntu 24.04 on master a7ede0a5d, in an all-examples build (#8605). Defining OF_CAIRO for TARGET_LINUX brings it back.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions