Trying to create preference page for workbench.

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Trying to create preference page for workbench.

Post by keithsloan52 »

I am trying to follow https://wiki.freecadweb.org/Workbench_creation/en
In particulatar comple Qtr Designer https://wiki.freecadweb.org/Compile_on_ ... ner_plugin

But when I try

Code: Select all

cd freecad-source/src/Tools/plugins/widget
$QT_DIR/bin/qmake plugin.pro
make
I get an error on the make

Code: Select all

keithsloan@Keiths-iMac widget % pwd
/Users/keithsloan/MEGA/MEGAsync/FreeCAD_KS/src/Tools/plugins/widget
keithsloan@Keiths-iMac widget % /usr/local/Cellar/qt/5.14.2/bin/qmake plugin.pro
Info: creating stash file /Users/keithsloan/MEGA/MEGAsync/FreeCAD_KS/src/Tools/plugins/widget/.qmake.stash
keithsloan@Keiths-iMac widget % make
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -pipe -stdlib=libc++ -O2 -std=gnu++11  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -Wall -Wextra -dM -E -o moc_predefs.h /usr/local/Cellar/qt/5.14.2/mkspecs/features/data/dummy.cpp
/usr/local/Cellar/qt/5.14.2/bin/moc -DQT_NO_DEBUG -DQT_PLUGIN -DQT_DESIGNER_LIB -DQT_UIPLUGIN_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS --include /Users/keithsloan/MEGA/MEGAsync/FreeCAD_KS/src/Tools/plugins/widget/moc_predefs.h -I/usr/local/Cellar/qt/5.14.2/mkspecs/macx-clang -I/Users/keithsloan/MEGA/MEGAsync/FreeCAD_KS/src/Tools/plugins/widget -I/Users/keithsloan/MEGA/MEGAsync/FreeCAD_KS/src/Tools/plugins/widget -I/usr/local/Cellar/qt/5.14.2/lib/QtDesigner.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtUiPlugin.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtXml.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtCore.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.3/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -F/usr/local/Cellar/qt/5.14.2/lib customwidgets.h -o moc_customwidgets.cpp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++11  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -Wall -Wextra -fPIC -DQT_NO_DEBUG -DQT_PLUGIN -DQT_DESIGNER_LIB -DQT_UIPLUGIN_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS -I. -I. -I/usr/local/Cellar/qt/5.14.2/lib/QtDesigner.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtUiPlugin.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtXml.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AGL.framework/Headers -I/usr/local/Cellar/qt/5.14.2/mkspecs/macx-clang -F/usr/local/Cellar/qt/5.14.2/lib -o moc_customwidgets.o moc_customwidgets.cpp
/usr/local/Cellar/qt/5.14.2/bin/moc -DQT_NO_DEBUG -DQT_PLUGIN -DQT_DESIGNER_LIB -DQT_UIPLUGIN_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS --include /Users/keithsloan/MEGA/MEGAsync/FreeCAD_KS/src/Tools/plugins/widget/moc_predefs.h -I/usr/local/Cellar/qt/5.14.2/mkspecs/macx-clang -I/Users/keithsloan/MEGA/MEGAsync/FreeCAD_KS/src/Tools/plugins/widget -I/Users/keithsloan/MEGA/MEGAsync/FreeCAD_KS/src/Tools/plugins/widget -I/usr/local/Cellar/qt/5.14.2/lib/QtDesigner.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtUiPlugin.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtXml.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtCore.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.3/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -F/usr/local/Cellar/qt/5.14.2/lib plugin.h -o moc_plugin.cpp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++11  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -Wall -Wextra -fPIC -DQT_NO_DEBUG -DQT_PLUGIN -DQT_DESIGNER_LIB -DQT_UIPLUGIN_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS -I. -I. -I/usr/local/Cellar/qt/5.14.2/lib/QtDesigner.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtUiPlugin.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtXml.framework/Headers -I/usr/local/Cellar/qt/5.14.2/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AGL.framework/Headers -I/usr/local/Cellar/qt/5.14.2/mkspecs/macx-clang -F/usr/local/Cellar/qt/5.14.2/lib -o moc_plugin.o moc_plugin.cpp
rm -f libFreeCAD_widgets.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names  -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -Wl,-rpath,@executable_path/../Frameworks -single_module -dynamiclib -o libFreeCAD_widgets.dylib customwidgets.o plugin.o moc_customwidgets.o moc_plugin.o  -F/usr/local/Cellar/qt/5.14.2/lib -framework QtDesigner -framework QtWidgets -framework QtGui -framework AppKit -framework Metal -framework QtXml -framework QtCore -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL    
Undefined symbols for architecture x86_64:
  "QByteArray::shared_null", referenced from:
      Gui::PrefFileChooser::PrefFileChooser(QWidget*) in customwidgets.o
      Gui::PrefFileChooser::PrefFileChooser(QWidget*) in customwidgets.o
      Gui::InputField::InputField(QWidget*) in customwidgets.o
      Gui::InputField::InputField(QWidget*) in customwidgets.o
      Gui::PrefUnitSpinBox::PrefUnitSpinBox(QWidget*) in customwidgets.o
      Gui::PrefUnitSpinBox::PrefUnitSpinBox(QWidget*) in customwidgets.o
      Gui::CommandIconView::startDrag(QFlags<Qt::DropAction>) in customwidgets.o
      ...
  "QMetaObject::changeGuard(QObject**, QObject*)", referenced from:
      _qt_plugin_instance in plugin.o
  "QMetaObject::removeGuard(QObject**)", referenced from:
      QPointer<QObject>::~QPointer() in plugin.o
  "QColorDialog::getColor(QColor const&, QWidget*)", referenced from:
      Gui::ColorButton::onChooseColor() in customwidgets.o
  "QCoreApplication::translate(char const*, char const*, char const*, QCoreApplication::Encoding)", referenced from:
      Gui::LocationWidget::retranslateUi() in customwidgets.o
      Gui::ActionSelector::ActionSelector(QWidget*) in customwidgets.o
  "QDrag::QDrag(QWidget*)", referenced from:
      Gui::CommandIconView::startDrag(QFlags<Qt::DropAction>) in customwidgets.o
  "QObject::connectNotify(char const*)", referenced from:
      vtable for Gui::UnsignedValidator in customwidgets.o
  "QObject::disconnectNotify(char const*)", referenced from:
      vtable for Gui::UnsignedValidator in customwidgets.o
  "QString::shared_null", referenced from:
      Gui::UrlLabel::UrlLabel(QWidget*, QFlags<Qt::WindowType>) in customwidgets.o
      Gui::FileChooser::FileChooser(QWidget*) in customwidgets.o
      Gui::FileChooser::chooseFile() in customwidgets.o
      Gui::AccelLineEdit::keyPressEvent(QKeyEvent*) in customwidgets.o
      Gui::ActionSelector::ActionSelector(QWidget*) in customwidgets.o
      Gui::InputField::InputField(QWidget*) in customwidgets.o
      Gui::InputField::InputField(QWidget*) in customwidgets.o
      ...
  "QString::free(QString::Data*)", referenced from:
      Gui::UrlLabel::UrlLabel(QWidget*, QFlags<Qt::WindowType>) in customwidgets.o
      Gui::UrlLabel::~UrlLabel() in customwidgets.o
      Gui::UrlLabel::~UrlLabel() in customwidgets.o
      non-virtual thunk to Gui::UrlLabel::~UrlLabel() in customwidgets.o
      Gui::UrlLabel::~UrlLabel() in customwidgets.o
      Gui::UrlLabel::mouseReleaseEvent(QMouseEvent*) in customwidgets.o
      Gui::LocationWidget::retranslateUi() in customwidgets.o
      ...
  "QString::fromUtf8(char const*, int)", referenced from:
      Gui::ActionSelector::ActionSelector(QWidget*) in customwidgets.o
      Gui::QuantitySpinBox::stepBy(int) in customwidgets.o
  "QString::fromAscii(char const*, int)", referenced from:
      Gui::UrlLabel::UrlLabel(QWidget*, QFlags<Qt::WindowType>) in customwidgets.o
  "QVariant::handler", referenced from:
      Gui::CommandIconView::startDrag(QFlags<Qt::DropAction>) in customwidgets.o
  "QMetaObject::tr(char const*, char const*) const", referenced from:
      Gui::FileChooser::chooseFile() in customwidgets.o
      Gui::AccelLineEdit::AccelLineEdit(QWidget*) in customwidgets.o
      Gui::AccelLineEdit::keyPressEvent(QKeyEvent*) in customwidgets.o
  "QString::arg(QString const&, int, QChar const&) const", referenced from:
      Gui::UrlLabel::mouseReleaseEvent(QMouseEvent*) in customwidgets.o
      Gui::InputField::setValue(double) in customwidgets.o
      Gui::InputField::setUnitText(QString) in customwidgets.o
      Gui::QuantitySpinBox::setValue(double) in customwidgets.o
      Gui::QuantitySpinBox::stepBy(int) in customwidgets.o
      Gui::QuantitySpinBox::setUnitText(QString) in customwidgets.o
  "QString::arg(double, int, char, int, QChar const&) const", referenced from:
      Gui::InputField::setValue(double) in customwidgets.o
      Gui::InputField::setUnitText(QString) in customwidgets.o
      Gui::QuantitySpinBox::setValue(double) in customwidgets.o
      Gui::QuantitySpinBox::stepBy(int) in customwidgets.o
      Gui::QuantitySpinBox::setUnitText(QString) in customwidgets.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libFreeCAD_widgets.dylib] Error 1
keithsloan@Keiths-iMac widget % 
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Trying to create preference page for workbench.

Post by wmayer »

keithsloan52 wrote: Thu Jul 16, 2020 2:29 pm "QString::fromAscii(char const*, int)", referenced from:
Gui::UrlLabel::UrlLabel(QWidget*, QFlags<Qt::WindowType>) in customwidgets.o
I wonder why it tries to reference QString::fromAscii. This function is not used in the source and has been removed with Qt5. Might it be possible that you have some Qt4/Qt5 mixup?
Post Reply