[Solved] Build Qt 5.2.1 + VTK 6.1.0 + CMake 2.8.12.2
-
Sorry im a little lost (just starting with OSX, QT and VTK...). I'm compiling with "make" and i'm not using XCode for anything. Where can i found that option?
-
Somewhere in your Makefile then. grep through them for GCC_ENABLE_OBJC_GC
-
Hi again SGaist and thanks for your patience,
I searched for GCC_ENABLE_OBJ_GC at the Makefile, and is not in there. I tried building with XCode and the same error appears, so i looked for that into the "Build Settings" in XCode and it doesn't appear, so i defined it and set it to unsupported (just testing). Again i got the same error (Garbage collection is no longer supported).
By the way, as i see into the "documentation":https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html , the default value is unsupported, but seems that the problem is here because of the message.I'll be trying to solve this, what do you think?
Thanks again.
-
Did you search in the sources ?
-
I searched into the sources, the "Makefile" build and the "XCode" build with GREP recursively into the folder tree but no result was found!
-
And the Xcode project itself ?
-
Into the “Build Settings” in XCode i couldn't find it (The documentation says it must be defined there, but if it isn't, it's "unsupported" by default).
Thanks for your help.
-
Did you search for only garbage ?
-
Hello again,
Finally I got the answer just searching the web! After the changes i could compile VTK and QT together :).
The problem was at the CMakeLists of VTK and not on the QT ones. It was one feature not supported by XCode as you say (VTK_REQUIRED_OBJCXX_FLAGS ). The problem will be solved in VTK 6.2 as you can see in the Summary of changes: "http://www.vtk.org/Wiki/VTK#Summary_of_Changes":http://www.vtk.org/Wiki/VTK#Summary_of_Changes
If anyone gets this problem, just delete or comment this lines from the CMakeList.txt at the top of the VTK source:
@IF(APPLE)
Being a library, VTK may be linked in either GC (garbage collected)
processes or non-GC processes. Default to "GC supported" so that both
GC and MRR (manual reference counting) are supported.
SET(VTK_OBJCXX_FLAGS_DEFAULT "-fobjc-gc")
SET(VTK_REQUIRED_OBJCXX_FLAGS ${VTK_OBJCXX_FLAGS_DEFAULT} CACHE STRING "Extra flags for Objective-C++ compilation")
MARK_AS_ADVANCED(VTK_REQUIRED_OBJCXX_FLAGS)
ENDIF(APPLE)@As you see the problem is solved at VTK github repository setting this flag to empty : "VTK CMakeLists":https://github.com/Kitware/VTK/blob/master/CMakeLists.txt
Thank you so much for your help and i hope i will continue contributing here as a Qt developer =).
-
You're welcome !
Glad you found out !
Sure you will :)
Happy coding !