Mail Archives: djgpp/1996/08/07/08:46:40
Xref: | news2.mv.net comp.os.msdos.djgpp:6710
|
Newsgroups: | comp.os.msdos.djgpp
|
From: | macleod AT onyx DOT interactive DOT net (J.J. Pierson )
|
Subject: | linking question
|
Lines: | 42
|
Organization: | Mordor International
|
Message-ID: | <DvHGAq.G29@ritz.mordor.com>
|
Date: | Thu, 1 Aug 1996 23:37:37 GMT
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
OK. I was playing around with the gcc compiler and ld linker. I figured
I'd try to compile to an object file and then link it separately.
I compiled like this:
"gcc -c proto.c"
I got a proto.o file.
I then tried:
"ld proto.o -lc"
It can't find the file -lc...
I then tried:
"ld proto.o -L d:\djgpp\lib\ -lc"
It finds the file, but I then get errors such as:
* d:/djgpp/bin/ld.exe: warning: cannot find entry symbol start; defaulting
* to 000010a8
*
* malloc.c(.text+0x1e): undefined reference to `__sbrk'
*
and similar errors to the malloc.c line for the following files:
more malloc.c
exit.c, _main.c, crt1.c, dpmiexcp.c, abort.c, and c1args.c
I have no idea why it's not linking correctly, esp. since if I just do
"gcc proto.c", it will compile and link fine.
--
------------------------------------------------------------------------------
| J.J. Pierson - macleod AT ritz DOT mordor DOT com | There Can Be Only One! |
| | |
| Visit my Highlander Home Page at: | Finger macleod AT ritz DOT mordor DOT com |
| http://www.mordor.com/macleod/home.html | For Twin Peaks Quotes |
------------------------------------------------------------------------------
- Raw text -