On 17 April 2007 14:21, Brian Dessent wrote: [ other issues aside, ... ]
>> gcc -shared -o cygmathlib.dll \ >> -Wl,--enable-auto-image-base \ >> -Wl,--out-implib=libmathlib.dll.a \ >> -Wl,--enable-auto-import >> -Wl,--whole-archive libmathlib.a \ >> -Wl,--no-whole-archive -lg2c >> >> but it fails with a lot of : >> ------------------------------------- >> libmathlib.a(arithm.o):cccrN4fn.f:(.text+0x17): undefined reference to >> `_funct_' libmathlib.a(arithm.o):cccrN4fn.f:(.text+0x154): undefined >> reference to `_funct_' libmathlib.a(d501l1.o):cc44FCLd.f:(.text+0x2dd): >> undefined reference to `_dvset_' ... >> ------------------------------------- >> >> Perhaps I have forgot to add some other library on command line. > > I don't know. You'll have to use nm/ar to look around and see where > these missing symbols are defined. It could be a missing library, it > could be a link order problem, or it could be that some preprocessor > symbol was in the wrong state (i.e. defined when it shouldn't be or > missing when it was required, ala -DFOO_STATIC or -DBUILDING_FOO or > -DFOO_DLL etc.) when the objects were compiled which caused __declspec > declarations to be wrong. It all depends on the design of the library. It's almost inevitable, isn't it? A static (.a) library can have undefined external references, but on 'doze, a shared library (== a DLL) can't have any - unlike a linux .so, which needn't be fully resolved until it's dynamically loaded by ld.so at runtime. cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/