From: Jose F. <jrf...@em...> - 2001-09-17 22:12:04
|
----- Original Message ----- From: "Jim Roy" <ji...@ng...> To: <min...@li...> Sent: Monday, September 17, 2001 9:49 PM Subject: [Mingw-users] Splitting a DLL > Hi everyone, > > I have a working DLL that I want to split into 2 parts. > > Shouldn't I be able to cook up the two parts, using > pretty much the same process as for the whole enchillada? > In principle yes. But some files will probably have to be rebuilted, especially if they export data. The data that belongs to the other dll mu= st be preceded by __declspec(dllimport) in the declaration and vice-versa. S= o it can mean using CPP macros in the declaration headers. > For some reason, the application can't load the one DLL. Could you be more specific here? > Nm shows that it contains DllMain@12 and DllMainCRTStartup@12. > I suspect this is my problem, because I don't see these in the > "big" dll, but I can't figure out why they are there, or how to > make them go away. > AFAIK, these must be present in all dlls. They are equivalent to the main= () function of C in the dll word. If you don't provide these functions yourself, the linker will link the default one provided by the mingw C runtime libraries. IMHO, they shouldn't be important unless there must be specific startup/e= xit code when loading the dll. > I've tried various combinations of g77 -shared and dlltool/g77 > as per the dlltool man page. BTW, One source file is fortran, > and the rest are C, and it's the DLL with the fortran that > has the extra symbols. > > Can someone give me a hint? > As said before please give more information (the error message, when does= it appear, ...). Jos=E9 Fonseca > Thanks, > > --- > Jim Roy voice 541 757 7231 > Sys. Admin. fax 541 757 7331 > NW Geophysical Assoc. http://www.nga.com > Corvallis Or. US > --- |