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 X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Wed, 5 May 2004 14:19:39 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Ted Yu cc: cygwin AT cygwin DOT com Subject: RE: DLL generation under Cygwin In-Reply-To: <20040505165807.3244.qmail@web12108.mail.yahoo.com> Message-ID: References: <20040505165807 DOT 3244 DOT qmail AT web12108 DOT mail DOT yahoo DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.39 On Wed, 5 May 2004, Ted Yu wrote: > Hi, Igor: > > So does MSVCRT.dll, which is what MinGW uses for its > > runtime. > > I am not familiar with MinGW. What is it ? . This is what you invoke when you give the -mno-cygwin flag to gcc. Incidentally, once you eliminate Cygwin from the equation, any further questions or problem reports about "gcc -mno-cygwin" should go to the mingw-users list. > > Why are you linking in libc.a explicitly? The appropriate version > > should be automatically linked in by the compiler. > > If I omit libc.a, I get this: > ld: warning: cannot find entry symbol fftEntry AT 12; defaulting to 10001000 > djbfft2d.o(.text+0x3c0):djbfft2d.cpp: undefined reference to `_alloca' > djbfft2d.o(.text+0x44c):djbfft2d.cpp: undefined reference to `malloc' > djbfft2d.o(.text+0x7a7):djbfft2d.cpp: undefined reference to `free' That's because you use "ld" instead of "gcc". "gcc" (with appropriate flags, i.e., "-mno-cygwin") should do the right thing. You can also use "gcc -shared" instead of dlltool, IIRC. > > What's LIBS set to? What's DLLNAME set to? What's AS set to? > > LIBS is empty. DLLNAME is djbfft.dll. AS is as. > > > and using $(CC) to link instead of $(LD) (you can pass flags to ld via > > the -Wl,... options, IIRC). > > Any difference in doing so ? I got the above Makefile from Cygwin FAQ. See above. "gcc" does invoke "ld" under the covers, but it's very hard to reconstruct the actual command line manually, so why not just use "gcc"? > Does gcc accept -e option ? > Thanks If you mean "ld"'s option to set the start address, then "gcc" itself doesn't, but you can pass it to "ld" via -Wl,-e... Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton -- 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/