Re: Compiling to DLL in NewEra
Posted in 1996
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Tom Beuke wrote: > > dwc@cix.compulink.co.uk (David Chan) wrote : > > dw>> I can't understand the warning produced; I tried to use the compiled > dw>> code, but the program produces the error "<funtion_name> has not been > dw>> defined in any module ..." for each function within the DLL file. > dw>> > dw>> How can I solve this? > dw>> > dw> > dw>You can ignore the warning. You will notice that a lib is also produced > dw>with the dll. This lib is the stub to use for linking to the dll. > > I can't ignore the warning, after this warning, the p-code program stops, > when compiling to c-code, the linker says "unresolved external" for all > the constructors of the classes i compiled to a dll. The .lib file is > added to the list of files. > > --- _ > // Tom Beuke Mail : tob@blanker.ruhr.de > _ // Westhoffstr.13-15 Tel. : +49 231 839757 > \\X/ 44145 Dortmund > --- > 5 Kilometer zum Nachbarn, 18 Kilometer zum Arzt, 889 Kilometer zur Tochter, > 3 Schritte zum Telefon, 2000,-DM Telefonrechnung im Monat ... Sometimes the Application Builder _does not_ include your .lib in the .mak file. If you have put the .lib file in the C Libraries box, try re-generating the make file. If this does not work, you can edit the .mak file directly. Look for the lines used to create the .def file for the linker. (These will mostly all be the .lib files used.) e.g. link $(LINKFLAGS) @<< cust.lrf $(INFORMIXDIR)\\lib\\exeseg.obj+$(INFORMIXDIR)\\lib\\fglapp.obj+ cust.obj , cust.exe, cust.map, $(INFORMIXDIR)\\lib\\isqli501+ $(INFORMIXDIR)\\lib\\fgl+ $(INFORMIXDIR)\\lib\\newvcl+ $(INFORMIXDIR)\\lib\\cclesql+ $(INFORMIXDIR)\\lib\\ascl+ $(INFORMIXDIR)\\lib\\tse+ $(INFORMIXDIR)\\lib\\vct+ mydll.lib+ ^^^^^^^^^^ insert your .lib file in here! (don't forget the plus sign (+) at the end!) commdlg.lib+ libw+ llibcew, cust.def << rc $(RCEXEFLAGS) cust.exe del cust.def Also, .DLLs are not useable with P-Code (according to the documentation), I have never tried. -- +--------------------------------------------------------------------------------------------+ | Kelly S. Loyd - Kinetic Analyst - Mail: kellyl@wacher.com.au Tel: +61 49 29 5453 | | Wacher Computing Solutions 4/227 Darby Street, Newcastle NSW 2300 Australia | | "When constabulary duties' to be done, to be done, A Policemans lot is not a happy one." | +--------------------------------------------------------------------------------------------+