[CMake] My dammed problem with OSX and Qt

Leopold Palomo-Avellaneda leo at alaxarxa.net
Wed Jan 16 13:36:30 EST 2008


A Dimecres 16 Gener 2008, Bill Hoffman va escriure:
> Leopold Palomo-Avellaneda wrote:
> > A Dimecres 16 Gener 2008, Bill Hoffman va escriure:
> >> Leopold Palomo-Avellaneda wrote:
> >
> > 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
>
> OK, so all these symbols are from your stuff.  I think I know the
> problem. Linux allows for shared libraries to have undefined symbols,
> and the mac does not.  You need to add some
> target_link_libraries(libpluginregistrodeiva ...)
>
> Stuff into your cmake file.

I have it .....

target_link_libraries(${plugin} bulmalib ${QT_LIBRARIES} ${PGSQL_LIBRARIES})


> My guess is that if you went on to a linux system, and did nm on the .so
> , you would find these symbols are also undefined.  I think there is a
> flag like -undefined suppress or something that you can pass to the mac
> linker to make it work more like linux.  However, if you ever want to go
> to windows you will have to figure this out as there is no such flag on
> Windows.

yes, I agree. 

But how I can manage or protect this kind of stuff of different platforms.

Best regards,

Leo






More information about the CMake mailing list