From: daz Date: 2004-06-17T11:38:23+09:00 Subject: Re: Extension which depends on another extension Jeff Mitchell wrote: > > I have two extensions, ext_x.so and ext_y.so. ext_y.so references a > few functions defined in ext_x.so. > > On Linux this is okay; both build, link, and run fine. But on > Windows, gcc-mingw32 will not let me create ext_y.so, as it complains > about the undefined symbols which reside in ext_x.so. > > In the bigger picture, the Windows build is going to look > totally different than the unix build. If I could link with something > like --ignore-undefined that would be great, however I haven't found > such an option. > > Is there something I'm missing, or is it really going to be this hard? > ext_x.so should remain independent. As a last resort, I suppose I > could combine the two extensions into one, but that would be pretty > messy. In fact, I have three other extensions which require ext_x.so. > You have to link ext_y.so with the dynamic lib file for ext_x.so which will be a list of offsets to where the functions reside in ext_x.so . If you're not actually using those functions in ext_x, maybe you could: #ifdef _win32_ // or whatever it is for gcc :-) #endif .... around them. Or include dummy functions inside "#ifdef"s ?? (which is what Nobu just suggested, IIUC) I use Borland C and talk rubbish, so don't take too much notice :-) daz