Problems with ld

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
-KEN-

Problems with ld

Post by -KEN- »

Hey, when I try to use ld like it shows inthe tutorial, it won't work. I get the following:

>>>>>>>>>>>>>>>>>>>>
C:\DJGPP\KenStuff>ld -Ttext 0x100000 -oformat binary -o kernel32.bin kernel32.o
c:/djgpp/bin/ld.exe: cannot open binary: No such file or directory (ENOENT)
<<<<<<<<<<<<<<<<<<<

thanx for any help
Hillbillie

RE:Problems with ld

Post by Hillbillie »

Just put your *.o file in the bin directory for
DJGPP. From that directory, try to link it.
Guest

RE:Problems with ld

Post by Guest »

>On 2001-05-22 17:56:04, -KEN- wrote:
>Hey, when I try to use ld like it shows inthe tutorial, it won't work. I get the following:
>
>>>>>>>>>>>>>>>>>>>>>
>C:\DJGPP\KenStuff>ld -Ttext 0x100000 -oformat binary -o kernel32.bin kernel32.o
>c:/djgpp/bin/ld.exe: cannot open binary: No such file or directory (ENOENT)
><<<<<<<<<<<<<<<<<<<

did you put a space between "-o" and "format"? don't

or maybe you have to say "--oformat" instead, I dunno
-KEN-

RE:Problems with ld

Post by -KEN- »

even if I put it in the bin dir. I get the same error. I can compile it from C:\DJGPP\KenStuff even though GCC is in c:\djgpp\bin,so why can't I ld it from there? UGH
Hillbillie

RE:Problems with ld

Post by Hillbillie »

Hmm...I had this same problem starting out using DJGPP,
but I forgot how I fixed it. Sorry.
Guest

RE:Problems with ld

Post by Guest »

hmmmmmm......I tihnk I'll ask on Cprogramming.com's General Discuss board
if you have the answer go there! or post here....I'll check back...
Ben Hsu

RE:Problems with ld

Post by Ben Hsu »

>On 2001-05-24 17:31:44, Anonymous wrote:
>hmmmmmm......I tihnk I'll ask on Cprogramming.com's General Discuss board
>if you have the answer go there! or post here....I'll check back...

Hello,
The only problem you have is definitely with
the "--oformat" option when you were linking, for
one thing that is DJGPP takes in two kinds of
options one kind have the double hash and with a
verbal option name (e.g. --oformat), on the other
hand DJGPP takes the regular kind of options (e.g.
-h for help). These properties of DJGPP will make sure
the option is either "--" (double hash and verbal)
or "-" (single hash with shortened option). Hope
that this is helpful, if you find any problem feel
free to mail me at [email protected]

Ben Hsu
Post Reply