From: Pierre O. <os...@ce...> - 2005-12-14 09:09:44
|
Michael Gerdau wrote: >>The main polypaudio library is supposed to become a DLL. When trying to >>link it though, libtool complains loudly about only finding a static >>version of libm. I'm at a loss what should be done to remedy this. > > > I'm not sure I understand what you do but it seems you explicitly > invoke libtool. Why ? > > Or phrased differently: > Why don't you just invoke gcc/g++ with the appropriate options > and let it do all the dirty details ? > It's autotooled so libtool handles all the library stuff. The point is adding mingw support to the current structure and not creating an entire new build system just for one platform. > > If the above is beside the point it might be helpful if you post > the exact commands you are executing. > automake & co generates the makefile, so there's few additions on my part. But here is what is finally executed: /bin/sh ../libtool --mode=link i386-mingw32msvc-gcc -D_GNU_SOURCE -I/home/ossman/polypaudio -I/usr/local/cross-w32//include -I/usr/local/cross-w32//include -DDLSEARCHPATH=\"/usr/local/cross-w32//lib/polypaudio-0.8\" -DDEFAULT_CONFIG_DIR=\"/usr/local/cross-w32//etc/polypaudio\" -DPOLYPAUDIO_BINARY=\"/usr/local/cross-w32//bin/polypaudio\" '-DDEBUG_TRAP=__asm__("int $3")' -g -O2 -pipe -W -Wall -pedantic -std=gnu9x -Wno-unused-parameter -no-undefined -o libpolyp-simple-0.8.la -rpath /usr/local/cross-w32//lib -version-info 0:0:0 libpolyp_simple_0.8_la-polyplib-simple.lo libpolyp-0.8.la libpolyp-mainloop-0.8.la -lm Which gives me: *** Warning: linker path does not have real file for library -lm. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have *** because I did check the linker path looking for a file starting *** with libm and none of the candidates passed a file format test *** using a file magic. Last file checked: /usr/local/cross-w32/lib/gcc-lib/i386-mingw32msvc/3.2/../../../../i386-mingw32msvc/lib//libm.a *** The inter-library dependencies that have been dropped here will be *** automatically added whenever a program is linked with this library *** or is declared to -dlopen it. *** Since this library must not contain undefined symbols, *** because either the platform does not support them or *** it was explicitly requested with -no-undefined, *** libtool will only create a static version of it. If I bastardise libtool and remove the check for the above, it links fine. I haven't gotten to the point of linking the library to something functional yet so I don't know if it produces a correct dll. -- Pierre Ossman Telephone: +46-13-21 46 00 Cendio AB Web: http://www.cendio.com |