[vtkusers] Object not rendered using qvtk on powerpc

hedicu hedicu at gmail.com
Fri Nov 30 07:47:42 EST 2007


Hi Shakes,

thanks for your reply. I'm working on MacOS X Tiger. OpenGL works and I have
been using VTK for several months without any (big) problems. In this case I
didn't use qmake to generate the Makefile, instead I used the same Makefile
that worked on the Intel machine and modified it properly (just changed the
paths according to the location of qt and vtk installations on the powerpc).
Moreover I'm using gcc to compile my code (instead of xl since I had some
problems in the link phase with it, the symbols
std::__default_alloc_template<true, 0>::deallocate(void*, unsigned long) and
std::__default_alloc_template<true, 0>:: allocate(unsigned long) were
undefined and I wasn't able to find the proper libraries to link against).
In order to be consistent qt and vtk (with GUISupport option activated and
the qt related variables hopefully properly set) were again compiled with
gcc. So I cannot figure out what am I missing. And the compiler doesn't say
anything this time.

Best regards,
Héctor.
- Hide quoted text -


On Nov 30, 2007 2:14 AM, Shakes <Shekhar.Chandra at sci.monash.edu.au> wrote:

    Hi Hector,

    A few questions, what platform? Does open GL work on that platform? Does
    normal VTK work? Did u build using qmake (Qt Makefile generator)? What
    OS (Linux?)? Any other detail about the setup u may think that might be
    useful?

    Cheers
    Shakes

    hedicu wrote:
    > Maybe it is also interesting for you to know that with an slightly
changed
    > Makefile it works on an Intel machine.

hedicu wrote:
> 
> Hi everyone,
> 
> here i'm trying to build an example on a powerpc using the QVTKWidget
> class. It compiles but when executed nothing can be seen in the
> window. The code is the following:
> 
> #include <QApplication>
> #include "QVTKWidget.h"
> //#include <QEvent.h>
> 
> #include <vtkConeSource.h>
> #include <vtkPolyDataMapper.h>
> #include <vtkActor.h>
> #include <vtkRenderer.h>
> #include <vtkRenderWindow.h>
> 
> int main(int argc, char* argv[]) {
> 
>    vtkConeSource *cone = vtkConeSource::New();
>    cone->SetResolution(100);
>    cone->SetRadius(10);
>    cone->SetHeight(7);
>    cone->SetCenter(0,0,0);
> 
>    vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();
>    coneMapper->SetInputConnection(cone->GetOutputPort());
> 
>    vtkActor *coneActor = vtkActor::New();
>    coneActor->SetMapper(coneMapper);
> 
>    vtkRenderer *coneRen = vtkRenderer::New();
>    coneRen->AddActor(coneActor);
> 
>    vtkRenderWindow *coneRenWin = vtkRenderWindow::New();
>    coneRenWin->AddRenderer(coneRen);
> 
>    QApplication app(argc, argv);
>    QVTKWidget wdgt;
> 
>    wdgt.SetRenderWindow(coneRenWin);
> 
> #if QT_VERSION < 0x040000
>    app.setMainWidget(&wdgt);
> #endif
>    wdgt.show();
> 
> 
>    return app.exec();
> }
> 
> and the makefile
> 
> #############################################################################
> # Makefile for building: qvtk_gcc.app/Contents/MacOS/qvtk_gcc
> # Generated by qmake (2.01a) (Qt 4.2.3) on: Wed Nov 21 16:04:39 2007
> # Project:  qvtk_gcc.pro
> # Template: app
> # Command: /usr/local/lib/powerpc/qt/bin/qmake -macx -o Makefile
> qvtk_gcc.pro
> #############################################################################
> 
> ####### Compiler, tools and options
> 
> CC            = cc
> CXX           = c++
> LEX           = flex
> YACC          = yacc
> DEFINES       = -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
> CFLAGS        = -pipe -g -Wall -W -F/usr/local/lib/powerpc/qt/lib 
> $(DEFINES)
> CXXFLAGS      = -pipe -g -Wall -W -F/usr/local/lib/powerpc/qt/lib 
> $(DEFINES)
> LEXFLAGS      =
> YACCFLAGS     = -d
> INCPATH       =
> -I/private/var/automount/usr/local/lib/powerpc/qt/mkspecs/macx-g++ -I.
> -I/private/var/automount/usr/local/lib/powerpc/qt/lib/QtCore.framework/Versions/4/Headers
> -I/private/var/automount/usr/local/lib/powerpc/qt/include/QtCore
> -I/private/var/automount/usr/local/lib/powerpc/qt/include/QtCore
> -I/private/var/automount/usr/local/lib/powerpc/qt/lib/QtGui.framework/Versions/4/Headers
> -I/private/var/automount/usr/local/lib/powerpc/qt/include/QtGui
> -I/private/var/automount/usr/local/lib/powerpc/qt/include/QtGui
> -I/private/var/automount/usr/local/lib/powerpc/qt/include -I. -I. -I.
> -I/usr/local/lib/powerpc/vtk-gcc/include/vtk-5.1
> -I/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers
> -I/Library/Frameworks/3DconnexionClient.framework/Headers
> LINK          = c++
> LFLAGS        = -headerpad_max_install_names
> LIBS          = $(SUBLIBS)  -framework 3DconnexionClient -framework
> Carbon -framework GLUT -framework openGL -fleading-underscore
> -I/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers
> -I/Library/Frameworks/3DconnexionClient.framework/
> -F/usr/local/lib/powerpc/qt/lib -L/usr/local/lib/powerpc/qt/lib
> -framework QtGui -L/usr/local/lib/powerpc/vtk-gcc/lib -lvtkRendering
> -lvtkGraphics -lvtkImaging -lvtkIO -lvtkFiltering -lvtkCommon -lvtksys
> -lvtkpng -lvtktiff -lvtkzlib -lvtkjpeg -lvtkexpat -lvtkftgl
> -lvtkfreetype -framework OpenGL -framework AGL -framework Carbon
> -framework QuickTime -framework AppKit -framework QtCore -lz -lm
> -L/usr/X11R6/lib -lX11 -lGL -lXt -liconv -framework
> ApplicationServices -L/System/Library/Frameworks -framework OpenGL
> -framework AppKit -framework AGL -framework Carbon -framework
> 3DconnexionClient
> AR            = ar cq
> RANLIB        = ranlib -s
> QMAKE         = /usr/local/lib/powerpc/qt/bin/qmake
> TAR           = tar -cf
> COMPRESS      = gzip -9f
> COPY          = cp -f
> COPY_FILE     = cp -f
> COPY_DIR      = cp -f -R
> INSTALL_FILE  = $(COPY_FILE)
> INSTALL_DIR   = $(COPY_DIR)
> INSTALL_PROGRAM = $(COPY_FILE)
> DEL_FILE      = rm -f
> SYMLINK       = ln -sf
> DEL_DIR       = rmdir
> MOVE          = mv -f
> CHK_DIR_EXISTS= test -d
> MKDIR         = mkdir -p
> 
> ####### Output directory
> 
> OBJECTS_DIR   = ./
> 
> ####### Files
> 
> SOURCES       = QVTKWidget.cpp \
>                moc_QVTKWidget.cpp \
>                test.cpp
>        #       vtkSpcNavInteractor.cpp
> OBJECTS       = QVTKWidget.o \
>                moc_QVTKWidget.o \
>                test.o
>        #       vtkSpcNavInteractor.o
> DIST          =
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/common/unix.conf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/qconfig.pri \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_functions.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_config.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/exclusive_builds.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_pre.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_pre.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/objective_c.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/debug.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_post.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_post.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/warn_on.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt.prf \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/unix/thread.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/moc.prf \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/rez.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/sdk.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/resources.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/uic.prf \
>                qvtk_gcc.pro
> QMAKE_TARGET  = qvtk_gcc
> DESTDIR       =
> TARGET        = qvtk_gcc.app/Contents/MacOS/qvtk_gcc
> 
> ####### Custom Compiler Variables
> QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS = -pipe \
>                -g \
>                -Wall \
>                -W
> 
> 
> first: all
> ####### Implicit rules
> 
> .SUFFIXES: .o .c .cpp .cc .cxx .C
> 
> .cpp.o:
>        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
> 
> .cc.o:
>        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
> 
> .cxx.o:
>        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
> 
> .C.o:
>        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
> 
> .c.o:
>        $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
> 
> ####### Build rules
> 
> all: Makefile qvtk_gcc.app/Contents/PkgInfo
> qvtk_gcc.app/Contents/Info.plist $(TARGET)
> 
> $(TARGET):  $(OBJECTS)
>        @$(CHK_DIR_EXISTS) qvtk_gcc.app/Contents/MacOS/ || $(MKDIR)
> qvtk_gcc.app/Contents/MacOS/
>        $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
> 
> Makefile: qvtk_gcc.pro
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/macx-g++/qmake.conf
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/common/unix.conf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/qconfig.pri \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_functions.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_config.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/exclusive_builds.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_pre.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_pre.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/objective_c.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/debug.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_post.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_post.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/warn_on.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt.prf \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/unix/thread.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/moc.prf \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/rez.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/sdk.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/resources.prf
> \
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/uic.prf \
>                /usr/local/lib/powerpc/qt/lib/QtGui.framework/QtGui.prl \
>                /usr/local/lib/powerpc/qt/lib/QtCore.framework/QtCore.prl
>        $(QMAKE) -macx -o Makefile qvtk_gcc.pro
>               
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/common/unix.conf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/qconfig.pri:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_functions.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_config.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/exclusive_builds.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_pre.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_pre.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/objective_c.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/debug.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_post.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_post.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/warn_on.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/unix/thread.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/moc.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/rez.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/sdk.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/resources.prf:
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/uic.prf:
> /usr/local/lib/powerpc/qt/lib/QtGui.framework/QtGui.prl:
> /usr/local/lib/powerpc/qt/lib/QtCore.framework/QtCore.prl:
> qmake:  FORCE
>        @$(QMAKE) -macx -o Makefile qvtk_gcc.pro
> 
> qvtk_gcc.app/Contents/PkgInfo:
>        @$(CHK_DIR_EXISTS) qvtk_gcc.app/Contents || $(MKDIR)
> qvtk_gcc.app/Contents
>        @$(DEL_FILE) qvtk_gcc.app/Contents/PkgInfo
>        @echo "APPL????" >qvtk_gcc.app/Contents/PkgInfo
> qvtk_gcc.app/Contents/Info.plist:
>        @$(CHK_DIR_EXISTS) qvtk_gcc.app/Contents || $(MKDIR)
> qvtk_gcc.app/Contents
>        @$(DEL_FILE) qvtk_gcc.app/Contents/Info.plist
>        @sed -e "s, at ICON@,,g" -e "s, at EXECUTABLE@,qvtk_gcc,g" -e
> "s, at TYPEINFO@,????,g"
> /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/macx-g++/Info.plist.app
>>qvtk_gcc.app/Contents/Info.plist
> dist:
>        @$(CHK_DIR_EXISTS) .tmp/qvtk_gcc1.0.0 || $(MKDIR)
> .tmp/qvtk_gcc1.0.0
>        $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/qvtk_gcc1.0.0/ &&
> $(COPY_FILE) --parents QVTKWidget.h .tmp/qvtk_gcc1.0.0/ &&
> $(COPY_FILE) --parents QVTKWidget.cpp test.cpp .tmp/qvtk_gcc1.0.0/ &&
> (cd `dirname .tmp/qvtk_gcc1.0.0` && $(TAR) qvtk_gcc1.0.0.tar
> qvtk_gcc1.0.0 && $(COMPRESS) qvtk_gcc1.0.0.tar) && $(MOVE) `dirname
> .tmp/qvtk_gcc1.0.0`/qvtk_gcc1.0.0.tar.gz . && $(DEL_FILE) -r
> .tmp/qvtk_gcc1.0.0
> 
> 
> yaccclean:
> lexclean:
> clean:compiler_clean
>        -$(DEL_FILE) $(OBJECTS)
>        -$(DEL_FILE) *~ core *.core
> 
> 
> ####### Sub-libraries
> 
> distclean: clean
>        -$(DEL_FILE) -r qvtk_gcc.app
>        -$(DEL_FILE) Makefile
> 
> 
> /usr/local/lib/powerpc/qt/bin/moc:
>        (cd $(QTDIR)/src/tools/moc && $(MAKE))
> 
> mocclean: compiler_moc_header_clean compiler_moc_source_clean
> 
> mocables: compiler_moc_header_make_all compiler_moc_source_make_all
> 
> compiler_objective_c_make_all:
> compiler_objective_c_clean:
> compiler_moc_header_make_all: moc_QVTKWidget.cpp
> compiler_moc_header_clean:
>        -$(DEL_FILE) moc_QVTKWidget.cpp
> moc_QVTKWidget.cpp: QVTKWidget.h \
>                /private/var/automount/usr/local/lib/powerpc/qt/bin/moc
>        /usr/local/lib/powerpc/qt/bin/moc $(DEFINES) $(INCPATH) -D__APPLE__
> -D__GNUC__ QVTKWidget.h -o moc_QVTKWidget.cpp
> 
> compiler_rcc_make_all:
> compiler_rcc_clean:
> compiler_image_collection_make_all: qmake_image_collection.cpp
> compiler_image_collection_clean:
>        -$(DEL_FILE) qmake_image_collection.cpp
> compiler_moc_source_make_all:
> compiler_moc_source_clean:
> compiler_rez_source_make_all:
> compiler_rez_source_clean:
> compiler_uic_make_all:
> compiler_uic_clean:
> compiler_clean: compiler_objective_c_clean compiler_moc_header_clean
> compiler_rcc_clean compiler_image_collection_clean
> compiler_moc_source_clean compiler_rez_source_clean compiler_uic_clean
> 
> ####### Compile
> 
> QVTKWidget.o: QVTKWidget.cpp QVTKWidget.h
>        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o QVTKWidget.o QVTKWidget.cpp
> 
> test.o: test.cpp QVTKWidget.h
>        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o test.o test.cpp
> 
> moc_QVTKWidget.o: moc_QVTKWidget.cpp
>        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_QVTKWidget.o
> moc_QVTKWidget.cpp
> 
> ####### Install
> 
> install:   FORCE
> 
> uninstall:   FORCE
> 
> FORCE:
> 
> It would be great if you could give me any hint.
> 
> Thanks,
> Hector.
> 

-- 
View this message in context: http://www.nabble.com/Object-not-rendered-using-qvtk-on-powerpc-tf4906218.html#a14050569
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list