This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: dllcrt2.o not found


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]