[Insight-users] Problem building QtImageViewer

Jarek Sacha galicjan@yahoo.com
Thu, 5 Dec 2002 14:43:23 -0800 (PST)


I have problem compiling QtImageViewer. I am running RedHat 8, gcc 3.2,
qt3.0.5, recent CVS ITK. First Makefile generates warnings:

----------------------------------------
Makefile:300: warning: overriding commands for target `QtSlicerGUI.o'
Makefile:292: warning: ignoring old commands for target `QtSlicerGUI.o'
Makefile:324: warning: overriding commands for target `QtSlicerHelpGUI.o'
Makefile:316: warning: ignoring old commands for target
`QtSlicerHelpGUI.o'
----------------------------------------

Looks that targets `QtSlicerGUI.o' and `QtSlicerHelpGUI.o' are generated
twice, here is a snipped from Makefile:

----------------------------------------
287: #---------------------------------------------------------
288: # Build QtSlicerGUI.o  From
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.h
289: #

291: QtSlicerGUI.o: /home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.h
292:	echo "$(CMAKE_CXX_COMPILER) $(CMAKE_CXX_FLAGS) $(INCLUDE_FLAGS) -c
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.h -o QtSlicerGUI.o"
293:	$(CMAKE_CXX_COMPILER) $(CMAKE_CXX_FLAGS) $(INCLUDE_FLAGS) -c
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.h -o QtSlicerGUI.o

295: #---------------------------------------------------------
296: # Build QtSlicerGUI.o  From
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx
297: #

299: QtSlicerGUI.o: /home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx
300:	echo "$(CMAKE_CXX_COMPILER) $(CMAKE_CXX_FLAGS) $(INCLUDE_FLAGS) -c
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx -o QtSlicerGUI.o"
301:	$(CMAKE_CXX_COMPILER) $(CMAKE_CXX_FLAGS) $(INCLUDE_FLAGS) -c
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx -o QtSlicerGUI.o
----------------------------------------

Make fails linking QtSlicer:

----------------------------------------
++ -rdynamic -g -O2 -ftemplate-depth-50 QtSlicerTest.o QtGlSliceView.o
QtSlicer.o QtSlicerGUI.o QtSlicerGUI.o moc_QtSlicerGUI.o QtSlicerHelpGUI.o
QtSlicerHelpGUI.o moc_QtSlicerHelpGUI.o moc_QtGlSliceView.o 
-L/home/sacha/src/Insight-build/bin -L/usr/lib/qt3-gcc3.2/lib
-lITKAlgorithms -lITKStatistics -lITKFEM -lqt -lGLU -lGL -lITKNumerics
-lITKIO -litkpng -litkzlib -lITKMetaIO -lITKBasicFilters -lITKCommon
-lVXLNumerics -lm -lpthread -ldl
-Wl,-rpath,/home/sacha/src/Insight-build/bin:/usr/lib/qt3-gcc3.2/lib  -o
QtSlicer
QtSlicerGUI.o: In function `Gui::Gui[not-in-charge](QWidget*, char const*,
bool, unsigned)':
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:60: multiple definition
of `Gui::Gui[not-in-charge](QWidget*, char const*, bool, unsigned)'
QtSlicerGUI.o:/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:60: first
defined here
QtSlicerGUI.o: In function `Gui::Gui[in-charge](QWidget*, char const*,
bool, unsigned)':
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:60: multiple definition
of `Gui::Gui[in-charge](QWidget*, char const*, bool, unsigned)'
QtSlicerGUI.o:/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:60: first
defined here
QtSlicerGUI.o: In function `Gui::~Gui [not-in-charge]()':
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:643: multiple definition
of `Gui::~Gui [not-in-charge]()'
QtSlicerGUI.o:/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:643: first
defined here
QtSlicerGUI.o: In function `Gui::~Gui [in-charge]()':
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:643: multiple definition
of `Gui::~Gui [in-charge]()'
QtSlicerGUI.o:/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:643: first
defined here
QtSlicerGUI.o: In function `Gui::~Gui [in-charge deleting]()':
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:643: multiple definition
of `Gui::~Gui [in-charge deleting]()'
QtSlicerGUI.o:/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:643: first
defined here
QtSlicerGUI.o: In function `Gui::DisplayIMin(int)':
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:648: multiple definition
of `Gui::DisplayIMin(int)'
QtSlicerGUI.o:/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:648: first
defined here
QtSlicerGUI.o: In function `Gui::DisplayPosition(int, int, int, float)':
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:653: multiple definition
of `Gui::DisplayPosition(int, int, int, float)'
QtSlicerGUI.o:/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:653: first
defined here
QtSlicerGUI.o: In function `Gui::DisplaySliceNumber(int)':
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:658: multiple definition
of `Gui::DisplaySliceNumber(int)'
QtSlicerGUI.o:/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:658: first
defined here
QtSlicerGUI.o: In function `Gui::Help()':
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:663: multiple definition
of `Gui::Help()'
QtSlicerGUI.o:/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:663: first
defined here
QtSlicerGUI.o: In function `Gui::DisplayIMax(int)':
/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:668: multiple definition
of `Gui::DisplayIMax(int)'
QtSlicerGUI.o:/home/sacha/src/tmp/QtImageViewer/QtSlicerGUI.cxx:668: first
defined here
QtSlicerHelpGUI.o: In function
`HelpWindow::HelpWindow[not-in-charge](QWidget*, char const*, bool,
unsigned)':
/home/sacha/src/tmp/QtImageViewer/QtSlicerHelpGUI.cxx:344: multiple
definition of `HelpWindow::HelpWindow[not-in-charge](QWidget*, char
const*, bool, unsigned)'
QtSlicerHelpGUI.o:/home/sacha/src/tmp/QtImageViewer/QtSlicerHelpGUI.cxx:344:
first defined here
QtSlicerHelpGUI.o: In function
`HelpWindow::HelpWindow[in-charge](QWidget*, char const*, bool,
unsigned)':
/home/sacha/src/tmp/QtImageViewer/QtSlicerHelpGUI.cxx:344: multiple
definition of `HelpWindow::HelpWindow[in-charge](QWidget*, char const*,
bool, unsigned)'
QtSlicerHelpGUI.o:/home/sacha/src/tmp/QtImageViewer/QtSlicerHelpGUI.cxx:344:
first defined here
QtSlicerHelpGUI.o: In function `HelpWindow::~HelpWindow
[not-in-charge]()':
/home/sacha/src/tmp/QtImageViewer/QtSlicerHelpGUI.cxx:370: multiple
definition of `HelpWindow::~HelpWindow [not-in-charge]()'
QtSlicerHelpGUI.o:/home/sacha/src/tmp/QtImageViewer/QtSlicerHelpGUI.cxx:370:
first defined here
QtSlicerHelpGUI.o: In function `HelpWindow::~HelpWindow [in-charge]()':
/home/sacha/src/tmp/QtImageViewer/QtSlicerHelpGUI.cxx:370: multiple
definition of `HelpWindow::~HelpWindow [in-charge]()'
QtSlicerHelpGUI.o:/home/sacha/src/tmp/QtImageViewer/QtSlicerHelpGUI.cxx:370:
first defined here
QtSlicerHelpGUI.o: In function `HelpWindow::~HelpWindow [in-charge
deleting]()':
/home/sacha/src/tmp/QtImageViewer/QtSlicerHelpGUI.cxx:370: multiple
definition of `HelpWindow::~HelpWindow [in-charge deleting]()'
QtSlicerHelpGUI.o:/home/sacha/src/tmp/QtImageViewer/QtSlicerHelpGUI.cxx:370:
first defined here
collect2: ld returned 1 exit status
make[1]: *** [QtSlicer] Error 1
make: *** [default_target] Error 2
----------------------------------------

Note that I can compile and run QtITK example application fine.

Help resolving this greatly appreciated.

Jarek

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com