Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Wed, 21 Mar 2001 16:07:30 -0800 (PST) From: Nate Lawson To: cygwin AT cygwin DOT com Subject: Re: dllcrt2.o not found In-Reply-To: <3AB93868.CEAA205B@yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 21 Mar 2001, Earnie Boyd wrote: > Nate Lawson wrote: > > > > On Wed, 21 Mar 2001, Earnie Boyd wrote: > > > Nate Lawson wrote: > > > > > > > > Thanks for the help getting the dll to compile. It worked. However, I'm > > > > still having linking problems. > > > > > > > > 1. Does it matter whether a DLL is linked in character or windows > > > > mode? (It makes no GDI calls). > > > > 2. Should I use gcc -shared or gcc -mdll to build? > > > > 3. Why can't it find dllcrt2.o? I've tried adding -lmsvcrt or -ldllcrt > > > > but no luck. > > > > > > > > Here is my linking line: > > > > gcc -mwindows -mno-cygwin -DDBG -s -Wl,--out-implib,Packet.a > > > > -mdll -o Packet.dll Packet.def Packet32.o -L /usr/lib/mingw > > > > /usr/lib/gcc-lib/i686-pc-cygwin/gcc-2.95.2-9/../../../../i686-pc-cygwin/bin/ld: > > > > cannot open dllcrt2.o: No such file or directory > > > > collect2: ld returned 1 exit status > > > > make: *** [main] Error 1 > > > > > > > > > > Did you install the mingw package? The -mno-cygwin indicates to gcc > > > that you want to build mingw programs. > > > > > > Earnie. > > > > Indeed I did: > > > > $ ls -l /usr/lib/mingw/ > > total 801 > > -rw-r--r-- 1 xx 544 390 Jan 30 15:23 CRT_noglob.o > > -rw-r--r-- 1 xx 544 1899 Jan 30 15:23 crt1.o > > -rw-r--r-- 1 xx 544 1989 Jan 30 15:23 crt2.o > > -rw-r--r-- 1 xx 544 379 Jan 30 15:23 crtmt.o > > -rw-r--r-- 1 xx 544 379 Jan 30 15:23 crtst.o > > -rw-r--r-- 1 xx 544 628 Jan 30 15:23 dllcrt1.o > > -rw-r--r-- 1 xx 544 628 Jan 30 15:23 dllcrt2.o > > -rw-r--r-- 1 xx 544 62322 Jan 30 15:23 libcoldname.a > > -rw-r--r-- 1 xx 544 297594 Jan 30 15:23 libcrtdll.a > > -rw-r--r-- 1 xx 544 7248 Jan 30 15:23 libmingw32.a > > -rw-r--r-- 1 xx 544 1934 Jan 30 15:23 libmingwthrd.a > > -rw-r--r-- 1 xx 544 63402 Jan 30 15:23 libmoldname.a > > -rw-r--r-- 1 xx 544 406408 Jan 30 15:23 libmsvcrt.a > > -rw-r--r-- 1 xx 544 398358 Jan 30 15:23 libmsvcrt20.a > > -rw-r--r-- 1 xx 544 390724 Jan 30 15:23 libmsvcrt40.a > > Hmm... What happens if you > gcc -L /usr/lib/mingw -mwindows -mno-cygwin -DDBG -s > -Wl,--out-implib,Packet.a > -mdll -o Packet.dll Packet.def Packet32.o > instead. The -L switch is position dependent, although it shouldn't be > required. Same thing. Also same thing if I remove the -L completely. I've also tried -lmsvcrt, -lcrtdll, and every other lib in the /usr/lib/mingw directory -- all same error. I cannot get -mno-cygwin to link this DLL. BTW, I was able to get it to link by removing -mno-cygwin but this creates a DLL that crashes my application. If I use the same DLL compiled under MSVC, the app works fine with no recompilation. -Nate -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple