|
From: Erik L. <eri...@gm...> - 2025-03-19 22:11:14
|
Hi, I did solve the second problem, I believe. In src/qtterminal/gnuplot_qt.cpp, immediately prior to the line QtGnuplotApplication application(argc, argv); one needs the line: Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin); As far as I can tell, other platforms would need a similar line if one wishes to build a static binary. For Qt6, the list is here: https://doc.qt.io/qt-6/qpa.html Erik On Wed, Mar 19, 2025 at 3:28 PM Erik Luijten <eri...@gm...> wrote: > Dear all, > > I am trying to create gnuplot executables for macOS in which the Qt > libraries are statically linked. It is easy to create static versions of > Qt, but I run into two problems: > > > 1. Compilation of gnuplot on macOS relies on pkg-config, but to the best > of my knowledge, pkg-config is not supported in Qt6 (if I am mistaken, I > would be grateful for pointers). > > > 2. Qt5 has support for pkg-config. A regular (dynamic) binary of gnuplot > works well with Qt. However, a statically compiled version of gnuplot > starts properly, but as soon as I issue the first plot command there is a > warning: > > qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in "" > > > > If I restart gnuplot after setting "export QT_DEBUG_PLUGINS=1", I get: > > FactoryLoader::QFactoryLoader() ignoring > "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3" since > plugins are disabled in static builds > > > As far as I can tell, the qtterminal source code should have a > Q_IMPORT_PLUGIN() command to work properly with static compilation, but I > do not know enough about Qt to be sure. > > > Any help would be appreciated! > > Erik > |