Advertisement

Issue with Borland C++ 4 MSDOS code compiling.

Started by April 02, 2019 12:38 PM
94 comments, last by UnshavenBastard 5 years, 6 months ago
11 minutes ago, Steve_Segreto said:

I suggest you go back to Borland 4.0 and make the changes I suggested and see if you still get that linker error. Like I said, you made the wrong decision to get around 'regs.w undefined' by changing toolchains into the future. You want to play in 1993? Stay in 1993, don't fast forward your tools past the publish date of the book's source code or you will get into undefined territory.

It seems like the author in his effort to support both major DOS development toolchains of the 1993-1994 timeframe accidentally made it so some of his code requires both Borland and Open Watcom to be installed at the same time to be built.

This is Borland C 4.0...

I also have Watcom. But the code for the Watcom-compiled library has a copyright claim on it, which the book says is off limits. The Borland one, according to the book, belongs to anyone who owns the CD.

I will stay with Borland 4.

You will get more help if you can take more time to explain what you have tried and what errors you are actually facing. Earlier you indicated you couldn't even compile. The reason you couldn't compile is very subtle and the way you resolved it is very important to tell this thread. Now you are saying you can't link. It's important to know all the private changes you have made and exactly what development tool chains you are using.

Advertisement

Ok.

1. I got a new copy of the project file from the D drive.

2. I took everything off of read only.

3. Corrected mouse.c and fdemo.c.

4. Saved and compiled.

5. Saw error with 32 bit detected in the Borland Assembly File and tried to fix it with the Linker settings in Options -> Project -> Linker-> 16-Bit Linker -> Enable 32 bit processing.

 

6. Fixed the 32 bit issue, but the IDE is giving me issues when it says it has an “unexpected build termination”.

 

7. Turned everything back to normal.

 

8. Posted feedback.

 

This is the step by step method of everything I did.

 

 

I don't have TASM.EXE in my installation of Borland C++ 4.0, so I'm not able to proceed to linking either.

Do you need me to provide a link?

Please … and also if you could cut and paste the link error you get after enabling 32-bit processing in your solution settings?

Advertisement
1 minute ago, Steve_Segreto said:

Please … and also if you could cut and paste the link error you get after enabling 32-bit processing in your solution settings?

https://winworldpc.com/product/turbo-assembler/4x

 

(Borland turbo assembler)

 

Console Message:

linking FDEMO.exe:

Linker Fatal: 32-bit record encountered in module clib\c0nt.ASM

 

There is nothing after this...

Also, hey, my first upvote!

Sorry I'm still a bit confused … Is that the linker error you get before configuring 'Enable 32-bit processing'? … That linker option allows the linker to accept and link 32-bit code produced by TASM compatible assemblers.

It seems like you know how to get past the Linker Fatal: 32-bit record encountered in module clib\c0nt.ASM error already?

Does the book author not list the settings necessary to link? I think you need to change the target processor to 486 and memory model to medium or large, also enable the 32-bit processing part so it uses TLINK32.EXE

Also make sure your target isn't a Windows executable or something? I'm confused to see c0nt.asm listed, seems like that is for Win NT and you want DOS protected mode executable (/Tpe).

 

5 minutes ago, Steve_Segreto said:

Sorry I'm still a bit confused … Is that the linker error you get before configuring 'Enable 32-bit processing'? … That linker option allows the linker to accept and link 32-bit code produced by TASM compatible assemblers.

It seems like you know how to get past the Linker Fatal: 32-bit record encountered in module clib\c0nt.ASM error already?

Does the book author not list the settings necessary to link? I think you need to change the target processor to 486 and memory model to medium or large, also enable the 32-bit processing part so it uses TLINK32.EXE

 

No the author is very vague, and that was before I was born, so he is probably not even alive now. Even if he is, he is probably in Germany.

 

 

With the linker option, I get the new ide error.

 

Error is:

”linking fdemo.exe

IDE error:

BCW: unexpected build termination”

 

this happens after I change the Linker setting for the 32 bit error thing.

30 minutes ago, Steve_Segreto said:

Sorry I'm still a bit confused … Is that the linker error you get before configuring 'Enable 32-bit processing'? … That linker option allows the linker to accept and link 32-bit code produced by TASM compatible assemblers.

It seems like you know how to get past the Linker Fatal: 32-bit record encountered in module clib\c0nt.ASM error already?

Does the book author not list the settings necessary to link? I think you need to change the target processor to 486 and memory model to medium or large, also enable the 32-bit processing part so it uses TLINK32.EXE

Also make sure your target isn't a Windows executable or something? I'm confused to see c0nt.asm listed, seems like that is for Win NT and you want DOS protected mode executable (/Tpe).

 

I’m going to try it in Windows XP 32 bit as you did.

30 minutes ago, Steve_Segreto said:

Sorry I'm still a bit confused … Is that the linker error you get before configuring 'Enable 32-bit processing'? … That linker option allows the linker to accept and link 32-bit code produced by TASM compatible assemblers.

It seems like you know how to get past the Linker Fatal: 32-bit record encountered in module clib\c0nt.ASM error already?

Does the book author not list the settings necessary to link? I think you need to change the target processor to 486 and memory model to medium or large, also enable the 32-bit processing part so it uses TLINK32.EXE

Also make sure your target isn't a Windows executable or something? I'm confused to see c0nt.asm listed, seems like that is for Win NT and you want DOS protected mode executable (/Tpe).

 

I’m going to try it in Windows XP 32 bit as you did.

This topic is closed to new replies.

Advertisement