[Insight-users] moc problem

Julien Jomier jjomier@cs.unc.edu
Thu, 13 Feb 2003 14:44:57 -0500


Hi imho,

In your CMakeList.txt:
Try to remove newprojectwindow.h from NewProject_MOC_SRCS
or (if it doesn't work)try to removenewprojectwindow.cpp from
NewProject_SRCS
This should solve the multiple definition problem.

Also, it seems that the class affichage1coupe is not compiled or the
functions are not defined. You may want to check your CMakeList.

Is this happening only on Linux ?

Julien

> -----Original Message-----
> From: insight-users-admin@public.kitware.com 
> [mailto:insight-users-admin@public.kitware.com] On Behalf Of imho
> Sent: Thursday, February 13, 2003 1:52 PM
> To: luis ibanez
> Cc: insight-users@public.kitware.com
> Subject: [Insight-users] moc problem
> 
> 
> Hi Luis,
> 
> because of the vtk_qt problem, now I try a version without 
> this library (who works also on windows).
> 
> But I've got a moc problem, here's following the error message : 
> 
> --------------------------------------------------------------------
> 
> Building executable NewProject...
> moc_newprojectwindow.o: In function `NewProjectWindow::className()
> const':
> moc_newprojectwindow.o(.text+0x0): multiple definition of
> `NewProjectWindow::className() const'
> moc_newprojectwindow.o(.text+0x0): first defined here
> moc_newprojectwindow.o(.data+0x0): multiple definition of 
> `NewProjectWindow::metaObj'
> moc_newprojectwindow.o(.data+0x0): first defined here
> moc_newprojectwindow.o: In function 
> `NewProjectWindow::tr(char const*, char const*)':
> moc_newprojectwindow.o(.text+0x6): multiple definition of 
> `NewProjectWindow::tr(char const*, char const*)'
> moc_newprojectwindow.o(.text+0x6): first defined here
> moc_newprojectwindow.o: In function 
> `NewProjectWindow::trUtf8(char const*, char const*)':
> moc_newprojectwindow.o(.text+0x52): multiple definition of 
> `NewProjectWindow::trUtf8(char const*, char const*)'
> moc_newprojectwindow.o(.text+0x52): first defined here
> moc_newprojectwindow.o: In function
> `NewProjectWindow::staticMetaObject()':
> moc_newprojectwindow.o(.text+0x9e): multiple definition of 
> `NewProjectWindow::staticMetaObject()'
> moc_newprojectwindow.o(.text+0x9e): first defined here
> moc_newprojectwindow.o: In function `NewProjectWindow::qt_cast(char
> const*)':
> moc_newprojectwindow.o(.text+0x10e): multiple definition of 
> `NewProjectWindow::qt_cast(char const*)'
> moc_newprojectwindow.o(.text+0x10e): first defined here
> moc_newprojectwindow.o: In function `NewProjectWindow::qt_invoke(int,
> QUObject*)':
> moc_newprojectwindow.o(.text+0x14c): multiple definition of 
> `NewProjectWindow::qt_invoke(int, QUObject*)'
> moc_newprojectwindow.o(.text+0x14c): first defined here
> moc_newprojectwindow.o: In function `NewProjectWindow::qt_emit(int,
> QUObject*)':
> moc_newprojectwindow.o(.text+0x2f4): multiple definition of 
> `NewProjectWindow::qt_emit(int, QUObject*)'
> moc_newprojectwindow.o(.text+0x2f4): first defined here
> moc_newprojectwindow.o: In function 
> `NewProjectWindow::qt_property(int,
> int, QVariant*)':
> moc_newprojectwindow.o(.text+0x316): multiple definition of 
> `NewProjectWindow::qt_property(int, int, QVariant*)'
> moc_newprojectwindow.o(.text+0x316): first defined here
> newprojectwindow.o: In function 
> `NewProjectWindow::NewProjectWindow[not-in-charge](QWidget*, 
> char const*, unsigned)':
> newprojectwindow.o(.text+0x2cf0): undefined reference to 
> `affichage1coupe::affichage1coupe[in-charge](double)'
> newprojectwindow.o: In function 
> `NewProjectWindow::NewProjectWindow[in-charge](QWidget*, char const*,
> unsigned)':
> newprojectwindow.o(.text+0x5d1e): undefined reference to 
> `affichage1coupe::affichage1coupe[in-charge](double)'
> newprojectwindow.o: In function `NewProjectWindow::ChangeSerie()':
> newprojectwindow.o(.text+0x6490): undefined reference to 
> `affichage1coupe::~affichage1coupe [in-charge]()'
> newprojectwindow.o(.text+0x64db): undefined reference to 
> `affichage1coupe::affichage1coupe[in-charge](double)'
> newprojectwindow.o: In function `NewProjectWindow::Aff1Coupe()':
> newprojectwindow.o(.text+0x6f51): undefined reference to 
> `affichage1coupe::chargerImages(readerVTK*, int)'
> newprojectwindow.o(.text+0x6f65): undefined reference to 
> `affichage1coupe::GetRenderWindow()'
> newprojectwindow.o: In function `NewProjectWindow::Aff4Coupes()':
> newprojectwindow.o(.text+0x7163): undefined reference to 
> `affichage1coupe::~affichage1coupe [in-charge]()'
> newprojectwindow.o(.text+0x71a2): undefined reference to 
> `affichage1coupe::affichage1coupe[in-charge](double)'
> newprojectwindow.o: In function `NewProjectWindow::Aff16Coupes()':
> newprojectwindow.o(.text+0x7669): undefined reference to 
> `affichage1coupe::~affichage1coupe [in-charge]()'
> newprojectwindow.o(.text+0x76a8): undefined reference to 
> `affichage1coupe::affichage1coupe[in-charge](double)'
> newprojectwindow.o: In function `NewProjectWindow::Aff4Vues()':
> newprojectwindow.o(.text+0x7adf): undefined reference to 
> `affichage1coupe::~affichage1coupe [in-charge]()'
> newprojectwindow.o(.text+0x7b1e): undefined reference to 
> `affichage1coupe::affichage1coupe[in-charge](double)'
> newprojectwindow.o: In function `NewProjectWindow::Aff1Vue3D()':
> newprojectwindow.o(.text+0x7fe3): undefined reference to 
> `affichage1coupe::~affichage1coupe [in-charge]()'
> newprojectwindow.o(.text+0x8022): undefined reference to 
> `affichage1coupe::affichage1coupe[in-charge](double)'
> newprojectwindow.o: In function `NewProjectWindow::DefilementImage()':
> newprojectwindow.o(.text+0x83ca): undefined reference to 
> `affichage1coupe::setSlice(int)'
> newprojectwindow.o: In function 
> `NewProjectWindow::DefilementWindow()':
> newprojectwindow.o(.text+0x84c1): undefined reference to 
> `affichage1coupe::setWindow(int)'
> newprojectwindow.o: In function `NewProjectWindow::DefilementColor()':
> newprojectwindow.o(.text+0x858d): undefined reference to 
> `affichage1coupe::setColor(int)'
> newprojectwindow.o: In function `NewProjectWindow::AjouterFiltre0()':
> newprojectwindow.o(.text+0x8671): undefined reference to 
> `affichage1coupe::ajouterFiltre(int, QProgressDialog*)'
> newprojectwindow.o: In function `NewProjectWindow::AjouterFiltre1()':
> newprojectwindow.o(.text+0x870a): undefined reference to 
> `affichage1coupe::ajouterFiltre(int, QProgressDialog*)'
> newprojectwindow.o: In function `NewProjectWindow::AjouterFiltre2()':
> newprojectwindow.o(.text+0x87b2): undefined reference to 
> `affichage1coupe::ajouterFiltre(int, QProgressDialog*)'
> newprojectwindow.o: In function `NewProjectWindow::AjouterFiltre3()':
> newprojectwindow.o(.text+0x885a): undefined reference to 
> `affichage1coupe::ajouterFiltre(int, QProgressDialog*)'
> collect2: ld returned 1 exit status
> make[1]: *** [NewProject] Erreur 1
> make: *** [default_target] Erreur 2
> 
> --------------------------------------------------------------
> ---------
> 
> I don't understand what it means :s
> 
> Thanks for helping
> 
> imho
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com 
> http://public.kitware.com/mailman/listinfo/ins> ight-users
>