X-Spam-Check-By: sourceware.org Date: Tue, 17 Apr 2007 14:50:43 +0200 (MET DST) From: Angelo Graziosi To: cygwin AT cygwin DOT com Subject: Transforming a static library to a DLL Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com I have a set of static fortran libraries (CERNLIB, http://www.webalice.it/angelo.graziosi/Cernlib.html) and I would transform them into DLLs. The libraries have been compiled mainly with command: --------------------------------------------------------------- g77 -c -O -fno-automatic -fno-second-underscore -fugly-complex... gcc -O1 -fomit-frame-pointer... --------------------------------------------------------------- and they are used linking as: ------------------------------------------- g77 foo.F .... /usr/local/cernlib/2005/lib/libmathlib.a -L/usr/lib -lcrypt -ldl ------------------------------------------- Trying to transform in DLL, for example the library 'libmathlib.a', I have tried this: 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. How can I determine that? ...or is, perhaps, the above method completely wrong? (I have tried to follow the method used for Lapack package in Cygwin). TIA, Angelo. -- 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/