Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macdeployqt is not able link correctly on OSX #162

Open
morriswinkler opened this issue Oct 19, 2015 · 0 comments
Open

macdeployqt is not able link correctly on OSX #162

morriswinkler opened this issue Oct 19, 2015 · 0 comments

Comments

@morriswinkler
Copy link

While this might rather be a problem with Qt5.5 i guess it can only be fixed in the go-qml itself, since it needs changes on how the c++ part is compiled, long story short.

i use macdeployqt to add qt framework to a app bundle, that way my executable is referenced to a bunch of qt libs that a re relative ( portable)

i end up with something like

# otool -L myProgram
gcode2time:
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
    @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.5.0, current version 5.5.0)
    @executable_path/../Frameworks/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.5.0, current version 5.5.0)
    @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui (compatibility version 5.5.0, current version 5.5.0)
    @executable_path/../Frameworks/QtQml.framework/Versions/5/QtQml (compatibility version 5.5.0, current version 5.5.0)
    @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.5.0, current version 5.5.0)
    @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore (compatibility version 5.5.0, current version 5.5.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

when i run it i get

objc[6213]: Class NotificationReceiver is implemented in both /Users/user/tools/go/src/gcode2time/LaydropCostCalculator.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets and /usr/local/Cellar/qt5/5.5.0/lib/QtWidgets.framework/QtWidgets. One of the two will be used. Which one is undefined.

i figured that this is to the fact that QApplication::setStyle(QStyleFactory::create("Fusion")); is called before QApplication app(argc, argv); is called, well i reference that from

https://forum.qt.io/topic/50305/qt-5-3-and-5-4-mac-application-crashes-on-startup-after-using-macdeployqt-app-unable-to-load-plugin-cocoa/8

i tried to find the corresponding part in go-qml, i coudn't maybe someone has some advice on how to make sure qt main() is structured in a way that reambles this post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant