-
Notifications
You must be signed in to change notification settings - Fork 317
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
[runSofa] Fix compilation when SofaGuiQt is not activated #599
Conversation
Hi fred, The sofa::qt::GuiDataRepository is pointing to the set of resources that are specific to the qt application complementing the shared DataRepository ("share/"). Consequently it is the expected behavior to have it only usable when SofaGuiQt is enabled. I quickly looked in the code base where it is used and the only usage are in qt specific code which shouldn't prevent the compilation. If it does then something is wrong and the right fix is to prevent non qt base code to use this repository. But maybe the problem you are facing is not a compilation problem but is more about sharing UI resources in different GUI.
But maybe I'm all wrong, if so please tell me. Damien. |
Actually, it was more a linking/DLL problem than a compilation problem. (at least for OS X)
runSofa knows the symbol as the header is included ; but if you dont compile SofaGuiQt, the symbol wont be present when the linking occurs (with SofaGuiMain which is supposed to load SofaGuiQt if present) Anyway, for now I was considering GuiDataRepository as a "global" repository for all GUIs. And making it into SofaGuiCommon seems to do the trick (at least in my point of view). But your solution with the SharedUIResources is more elegant indeed. |
Ok I see the problem (why qtcreator is not capable of showing this "usage" of GuiDataRepository is a mystery to me). Anyhow you are right in moving GuiDataRepository in SofaGuiCommon you need to fix then the path In SofaGuiCommon.cpp And somewhere in qt: |
Yes, you are right about the path when GuiDataRepository is instanciated ! |
[ci-build][with-scene-tests] |
It was not possible to compile runSofa without activating SofaGuiQt, because GuiDataRepository was instantiated in SofaGuiQt library.
As GuiDataRepository seems to be rather generic and not tied to Qt, GuiDataRepository has been moved to SofaGuiCommon ; and allows runSofa to be compiled without enabling SOFA_GUI_QT.
This PR:
Reviewers will merge only if all these checks are true.