X-Spam-Check-By: sourceware.org Message-ID: <44D9398C.5070802@sbcglobal.net> Date: Tue, 08 Aug 2006 20:25:32 -0500 From: Dave Bodenstab User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 Newsgroups: gmane.os.cygwin To: cygwin AT cygwin DOT com Subject: Re: Can't link TclMagick anymore References: <000001c6bb37$25f81ad0$556d65da AT anykey> In-Reply-To: <000001c6bb37$25f81ad0$556d65da@anykey> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0632-0, 08/08/2006), Outbound message X-Antivirus-Status: Clean Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Danny Smith wrote: > Dave Bodenstab wrote: > >> Warning: .drectve `-defaultlib:MSVCRT ' unrecognized >> Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized >> Cannot export ??_C AT _03KBFG@Tcl?$AA@: symbol not found >> Cannot export ??_C AT _0DM@EBFE AT This?5interpreter?5does?5not?5suppor@: >> symbol not found >> Cannot export ^?CORE_RL_magick__NULL_THUNK_DATA: symbol not found >> Cannot export ^?CORE_RL_wand__NULL_THUNK_DATA: symbol not found >> collect2: ld returned 1 exit status >> >> > > >> + binutils 20060709-1 > > > ld now recognizes the ".lib" suffix as an import lib and it has higher > priority than directing linking to a dll (without an import lib). > > Move the the msvc-built libs (CORE_RL_wand_.LIB? CORE_RL_magick_.LIB?) > out of your search path so that ld finds the .DLL files instead > (I suspect they are in /cygdrive/c/Program Files/ImageMagick) > > (alternatively, you could try adding > "-Wl,-no-export-libs,CORE_RL_wand_.LIB,CORE_RL_magick_.LIB" > or similar That must be the problem. Thanks. I've gotten further, but I still have a problem. First of all, my background is unix... so I've been thinking .dll=.so and .lib=.a I guess this is probably wrong... I've ran across the import/export lib terms but I don't know what they are :( I changed the -L to reference the directory where the ImageMagick .dll's live. But I *do* need the tclstub84.lib (which contains tclStubLib.obj -- there is no tclstub84.dll). I even did 'ar x tclstub84.lib' and put the tclStubLib.obj on the link command line. I still get: $ gcc -v -shared -mno-cygwin \ -o libTclMagick.dll \ -L'/cygdrive/c/Program Files/ImageMagick' \ TclMagick.o \ tclStubLib.obj \ -lCORE_RL_wand_ -lCORE_RL_magick_ Warning: .drectve `-defaultlib:MSVCRT ' unrecognized Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized Cannot export ??_C AT _03KBFG@Tcl?$AA@: symbol not found Cannot export ??_C AT _0DM@EBFE AT This?5interpreter?5does?5not?5suppor@: symbol not found If I recompile so I don't need tclstub84.lib (and link against tcl84.dll) things work -- *but* I lose Tcl's feature that loads the tcl dll dynamically so I don't have to re-link every time a new release of Tcl is made available. So... binutils has changed. + Is there any way to get the old behavior? The older version must have been able to use tclstub84.lib and link in the .obj or it would not have been able to create a working .dll (since I never linked against Tcl's .dll's -- they're in a different directory) + Can I somehow convert the tclStubLib.obj into something that the new binutils can use? + Or do I need to abandon Cygwin for this and install yet another gcc from MingW? Thanks again for the help. -- 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/