www.digitalmars.com         C & C++   DMDScript  

c++.dos.32-bits - linking problems

reply "Laurentiu Pancescu" <lpancescu fastmail.fm> writes:
I just got the source of nasm-0.98bf, which seems not linkable with x32.lib,
but everything is fine with x32v.lib.  OPTLINK says x32.lib is somehow
corrupt (error 45).  But this only happens with that source, all other
programs can be linked with x32.lib, without any problem - even the
originally released version of nasm-0.98 is fine with x32.lib.  Any ideas
what might trigger this behaviour?

Laurentiu
Feb 02 2002
parent reply "Walter" <walter digitalmars.com> writes:
I have no idea. I would guess that the nasm .obj's are corrupt. The only way
to find the problem is to cut away the nasm code until it links, then you'll
know what bit caused the problem.

"Laurentiu Pancescu" <lpancescu fastmail.fm> wrote in message
news:a3g66o$169a$1 digitaldaemon.com...
 I just got the source of nasm-0.98bf, which seems not linkable with
x32.lib,
 but everything is fine with x32v.lib.  OPTLINK says x32.lib is somehow
 corrupt (error 45).  But this only happens with that source, all other
 programs can be linked with x32.lib, without any problem - even the
 originally released version of nasm-0.98 is fine with x32.lib.  Any ideas
 what might trigger this behaviour?

 Laurentiu
Feb 02 2002
parent reply "Laurentiu Pancescu" <lpancescu fastmail.fm> writes:
"Walter" <walter digitalmars.com> wrote in message
news:a3gbou$1got$1 digitaldaemon.com...
 I have no idea. I would guess that the nasm .obj's are corrupt. The only
way
 to find the problem is to cut away the nasm code until it links, then
you'll
 know what bit caused the problem.
Oops... my stupid mistake!!! :( When I modified for the first time Makefile.sc to work with DMC, I must have forgotten to type an empty line between nasm.exe and x32.lib (that empty line indicates the MAP file name, in a SMAKE inline response file). Later, when trying to link with x32v.lib, I corrected the mistake, but a MAP file named x32.lib, was already created in the current directory, and was seen by OPTLINK instead of X32's library... So, that's why linking with x32.lib failed, but with x32v.lib, not. I guess simple things are the hardest to see - sorry about this, Walter!! :( Laurentiu
Feb 03 2002
next sibling parent Jan Knepper <jan smartsoft.cc> writes:
This actually is a misake MANY people have made and I am among those...
It might be good to add something about this to the FAQ as this same thing has
happened to many users that accidentially overwrote their USER32.LIB and other
.LIB files...

Jan



Laurentiu Pancescu wrote:

 "Walter" <walter digitalmars.com> wrote in message
 news:a3gbou$1got$1 digitaldaemon.com...
 I have no idea. I would guess that the nasm .obj's are corrupt. The only
way
 to find the problem is to cut away the nasm code until it links, then
you'll
 know what bit caused the problem.
Oops... my stupid mistake!!! :( When I modified for the first time Makefile.sc to work with DMC, I must have forgotten to type an empty line between nasm.exe and x32.lib (that empty line indicates the MAP file name, in a SMAKE inline response file). Later, when trying to link with x32v.lib, I corrected the mistake, but a MAP file named x32.lib, was already created in the current directory, and was seen by OPTLINK instead of X32's library... So, that's why linking with x32.lib failed, but with x32v.lib, not. I guess simple things are the hardest to see - sorry about this, Walter!! :( Laurentiu
Feb 03 2002
prev sibling parent "Walter" <walter digitalmars.com> writes:
I'm just glad you found the problem. Since it is not unique to you (!), as
Jan pointed out, it is a good candidate for the FAQ. -Walter

"Laurentiu Pancescu" <lpancescu fastmail.fm> wrote in message
news:a3jgvl$2u58$1 digitaldaemon.com...
 "Walter" <walter digitalmars.com> wrote in message
 news:a3gbou$1got$1 digitaldaemon.com...
 I have no idea. I would guess that the nasm .obj's are corrupt. The only
way
 to find the problem is to cut away the nasm code until it links, then
you'll
 know what bit caused the problem.
Oops... my stupid mistake!!! :( When I modified for the first time Makefile.sc to work with DMC, I must have forgotten to type an empty line between nasm.exe and x32.lib (that empty line indicates the MAP file name, in a SMAKE inline response file). Later, when trying to link with
x32v.lib,
 I corrected the mistake, but a MAP file named x32.lib, was already created
 in the current directory, and was seen by OPTLINK instead of X32's
 library...  So, that's why linking with x32.lib failed, but with x32v.lib,
 not.

 I guess simple things are the hardest to see - sorry about this, Walter!!
 :(

 Laurentiu
Feb 03 2002