Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
X-Apparently-From: <earnie?boyd@yahoo.com>
Message-ID: <3AB93868.CEAA205B@yahoo.com>
Date: Wed, 21 Mar 2001 18:25:28 -0500
From: Earnie Boyd <earnie_boyd@yahoo.com>
Reply-To: Earnie Boyd <cygwin@cygwin.com>
X-Mailer: Mozilla 4.76 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Nate Lawson <nate@rootlabs.com>
CC: cygwin@cygwin.com
Subject: Re: dllcrt2.o not found
References: <Pine.BSF.4.21.0103211517050.89705-100000@rootlabs.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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.

Earnie.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

