A Dimecres 16 Gener 2008, Bill Hoffman va escriure: > Leopold Palomo-Avellaneda wrote: > > Hi, > > > > I'm one of the developers of a free software project [1]. I have made the > > transition from qmake to cmake. The project has several targets (one lib > > and 3 exes, and a lot of plugins). > > > > I can compile the whole project in a GNU/Linux box with: > > > > mkdir build > > cd build > > cmake ../ > > make > > > > without any problem. Howeber, when I try to compile the project in OSX, I > > can compile the libs, one exec but it fails with the first plugin. I have > > isolated the problem in this: > > > > Linking CXX shared library libpluginregistrodeiva.dylib > > Undefined symbols: > > > > I don't have any special consideration with the OSX platform (CMake is > > wonderfull, isn't it?) but it fails in this. It seems that the compiler, > > when link the plugin try to find anything that doesn't find (in linux it > > finds...) > > > > So, please, have I to make some special consideration about qt, plugins > > in MacOSX? > > > > Have I to put some directive, or property when I compile a plugin in OSX? > > It might be helpful to know what the undefined symbols are...
the system is: $ uic -v Qt User Interface Compiler version 4.3.3 $ moc -v Qt Meta Object Compiler version 59 (Qt 4.3.3) $ g++ -v Using built-in specs. Target: i686-apple-darwin9 Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg] [^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9 Thread model: posix gcc version 4.0.1 (Apple Inc. build 5465) and the error is in the plugin (or whatever plugin) Linking CXX shared library libpluginregistrodeiva.dylib Undefined symbols: "aplinteligentesview::aplinteligentesview(Empresa*, QWidget*)", referenced from: linprevcobro::creaPago() in linprevcobro.o "aplinteligentesview::setfechaasiento(QString)", referenced from: linprevcobro::creaPago() in linprevcobro.o "regivaprintview::regivaprintview(Empresa*, QWidget*)", referenced from: ListRegistroIvaView::boton_print() in listregistroivaview.o "BusquedaCuenta::BusquedaCuenta(QWidget*)", referenced from: Ui_CobroPagoBase::setupUi(QWidget*) in cobropagoview.o Ui_RegistroIvaBase::setupUi(QWidget*) in registroivaview.o "aplinteligentesview::inicializa(int)", referenced from: linprevcobro::creaPago() in linprevcobro.o "FichaBc::FichaBc(Empresa*, QWidget*, QFlags<Qt::WindowType>)", referenced from: RegistroIva::RegistroIva(Empresa*, QWidget*)in registroiva.o "aplinteligentesview::setvalores(QString, QString)", referenced from: linprevcobro::creaPago() in linprevcobro.o linprevcobro::creaPago() in linprevcobro.o linprevcobro::creaPago() in linprevcobro.o linprevcobro::creaPago() in linprevcobro.o "Asiento1View::muestraasiento(int)", referenced from: ListLinPrevCobroView::contextMenu(int, int, QPoint const&)in listlinprevcobroview.o ListRegistroIvaView::on_mui_tablasoportado_cellDoubleClicked(int, int)in listregistroivaview.o ListRegistroIvaView::on_mui_tablarepercutido_cellDoubleClicked(int, int)in listregistroivaview.o ListRegistroIvaView::on_mui_tablasoportado_trataMenu(QAction*) in listregistroivaview.o ListRegistroIvaView::on_mui_tablarepercutido_trataMenu(QAction*) in listregistroivaview.o "Bulmacont::empresaactual()", referenced from: myRegIVA::elslot() in pluginregistroiva.o myRegIVA::elslot() in pluginregistroiva.o myRegIVA::elslot1() in pluginregistroiva.o myRegIVA::elslot1() in pluginregistroiva.o "Empresa::numdigitosempresa()", referenced from: linprevcobro::setcodigocuenta(QString) in linprevcobro.o linprevcobro::setcodigoctacliente(QString) in linprevcobro.o "FichaBc::qt_metacall(QMetaObject::Call, int, void**)", referenced from: vtable for RegistroIvain registroiva.o RegistroIvaView::qt_metacall(QMetaObject::Call, int, void**)in moc_registroivaview.o "Asiento1::companyact()", referenced from: _Asiento1_guardaAsiento1_post in pluginregistroiva.o "FichaBc::empresaBase()", referenced from: vtable for RegistroIvain registroiva.o RegistroIvaView::RegistroIvaView(Empresa*, QWidget*)in registroivaview.o vtable for RegistroIvaViewin moc_registroivaview.o "SubForm2Bc::SubForm2Bc(QWidget*)", referenced from: Ui_CobroPagoBase::setupUi(QWidget*) in cobropagoview.o Ui_ListRegistroIvaBase::setupUi(QWidget*) in listregistroivaview.o Ui_ListRegistroIvaBase::setupUi(QWidget*) in listregistroivaview.o Ui_ListRegistroIvaBase::setupUi(QWidget*) in listregistroivaview.o Ui_ListRegistroIvaBase::setupUi(QWidget*) in listregistroivaview.o Ui_RegistroIvaBase::setupUi(QWidget*) in registroivaview.o Ui_RegistroIvaBase::setupUi(QWidget*) in registroivaview.o "FichaBc::staticMetaObject", referenced from: __ZN7FichaBc16staticMetaObjectE$non_lazy_ptr in registroiva.o RegistroIvaView::staticMetaObject in moc_registroivaview.o "FichaBc::~FichaBc()", referenced from: RegistroIva::~RegistroIva()in registroiva.o RegistroIva::~RegistroIva()in registroiva.o RegistroIva::~RegistroIva()in registroiva.o RegistroIva::~RegistroIva()in registroiva.o RegistroIva::RegistroIva(Empresa*, QWidget*)in registroiva.o "Asiento1::idasiento()", referenced from: linprevcobro::creaPago() in linprevcobro.o linprevcobro::creaPago() in linprevcobro.o "FichaBc::qt_metacast(char const*)", referenced from: vtable for RegistroIvain registroiva.o RegistroIvaView::qt_metacast(char const*)in moc_registroivaview.o "non-virtual thunk to FichaBc::empresaBase()", referenced from: vtable for RegistroIvain registroiva.o vtable for RegistroIvaViewin moc_registroivaview.o "FichaBc::metaObject() const", referenced from: vtable for RegistroIvain registroiva.o "aplinteligentesview::muestraplantilla(QString)", referenced from: linprevcobro::creaPago() in linprevcobro.o "aplinteligentesview::setmodo(int)", referenced from: linprevcobro::creaPago() in linprevcobro.o "regivaprintview::inicializa1(QString, QString)", referenced from: ListRegistroIvaView::boton_print() in listregistroivaview.o "typeinfo for FichaBc", referenced from: typeinfo for RegistroIvain registroiva.o "Empresa::bdempresa()", referenced from: linprevcobro::linprevcobro(Empresa*)in linprevcobro.o linprevcobro::linprevcobro(Empresa*, QString)in linprevcobro.o linprevcobro::linprevcobro(Empresa*, QString, QString, QString, QString, QString, QString, QString, QString, QString, QString, QString, QString, QString, QString, QString, QString)in linprevcobro.o "Empresa::intapuntsempresa()", referenced from: linprevcobro::creaPago() in linprevcobro.o linprevcobro::creaPago() in linprevcobro.o ListLinPrevCobroView::contextMenu(int, int, QPoint const&)in listlinprevcobroview.o ListRegistroIvaView::on_mui_tablasoportado_cellDoubleClicked(int, int)in listregistroivaview.o ListRegistroIvaView::on_mui_tablasoportado_cellDoubleClicked(int, int)in listregistroivaview.o ListRegistroIvaView::on_mui_tablasoportado_cellDoubleClicked(int, int)in listregistroivaview.o ListRegistroIvaView::on_mui_tablarepercutido_cellDoubleClicked(int, int)in listregistroivaview.o ListRegistroIvaView::on_mui_tablarepercutido_cellDoubleClicked(int, int)in listregistroivaview.o ListRegistroIvaView::on_mui_tablarepercutido_cellDoubleClicked(int, int)in listregistroivaview.o ListRegistroIvaView::on_mui_tablasoportado_trataMenu(QAction*) in listregistroivaview.o ListRegistroIvaView::on_mui_tablasoportado_trataMenu(QAction*) in listregistroivaview.o ListRegistroIvaView::on_mui_tablasoportado_trataMenu(QAction*) in listregistroivaview.o ListRegistroIvaView::on_mui_tablarepercutido_trataMenu(QAction*) in listregistroivaview.o ListRegistroIvaView::on_mui_tablarepercutido_trataMenu(QAction*) in listregistroivaview.o ListRegistroIvaView::on_mui_tablarepercutido_trataMenu(QAction*) in listregistroivaview.o ld: symbol(s) not found collect2: ld returned 1 exit status make[2]: *** [bulmacont/plugins/pluginregistroiva/libpluginregistrodeiva.0.11.0.dylib] Error 1 make[1]: *** [bulmacont/plugins/pluginregistroiva/CMakeFiles/pluginregistrodeiva.dir/all] Error 2 make: *** [all] Error 2 Regards, Leo _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake