Skip to content

How To: Use the pylon Framework in Qt Creator on macOS#

Basler offers the pylon framework for macOS, but the programmer's guide describes the settings for the Xcode IDE only.

This solution explains how the pylon framework can be used in Qt Creator.

Open the project file of Qt Creator and add all following lines:

INCLUDEPATH += $$PYLON_LIBRARY_DIR/pylon.framework/Headers
INCLUDEPATH += $$PYLON_LIBRARY_DIR/pylon.framework/Headers/GenICam
LIBS += -F$$PYLON_LIBRARY_DIR -framework pylon

It seems that Qt doesn't properly support the framework style of macOS. It still expects pylon's directory structure of pylon for Linux.

Therefore, you must create the standard pylon directory structure manually:

Create a directory with the name 'pylon' in:

mkdir /Library/Frameworks pylon.framework/Headers/pylon

Copy all header files and subdirectories from /Library/Frameworks/pylon.framework/Headers to /Library/Frameworks pylon.framework/Headers/pylon, e.g.:

cp –r /Library/Frameworks pylon.framework/Headers  /Library/Frameworks pylon.framework/Headers/pylon

Add the following environment variable in project's properties in build as well as in run dialog:


Alternatively, set this as global setting in mac environment:

export DYLD_LIBRARY_PATH={$DYLD_LIBRARY_PATH}:/Library/Frameworks/pylon.framework/Libraries/

For more information, see this Qt sample project.

Back to Knowledge Articles