Borland C ++ 5.02 IDE

zhaozj2021-02-11  151

One bug in Borland C 5.02 IDE

From http://coneos.126.com

Darkspy saw a bug about Borland C 5.02 IDE in the Borland C newsgroup.

This bug will make the compiler generate an error message "(1, 1) Bad Object File Record in Module XXX Near Module Offset 0x ........". Darkspy also tried it, it is indeed a problem.

If there is a fans of Borland C , you may wish to test it, the specific steps are as follows.

Establish a project, the target program is the MS-DOS program, the project name is called TM_TERROR,

Then, create a header file: Terror.h, write the code: #ifndef terr_h # Define Terr_h

Namespace foo {template inline t absolute (t number) {if (Number

#ENDIF

Then, create: terror.cpp, write code: #include "terror.h"

Namespace foo2 {using foo :: absolute;

INT DO_TEST (INT I) {Return Absolute (i);}}

Then, in the project file: TM_TERROR.CPP, write the code: Namespace foo2 {int Do_test (int); / * to spare a header, declaration * /}

INT main () {return foo2 :: do_test (0);

Note that in the project, TERROR.CPP must be on TM_TERROR.CPP, not, use the Alt Up key to mention.

Then, compile, you will find this error. :)

How to solve?

1) Do not use "Using Namespace :: Name;" in Template, use "Using Namespace;"; 2) to close the "Generate Debug Information" option in the IDE.

Nonetheless, Borland C 5.02 still is still a strong compiler, and DarkSpy has been using it. :)

Darkspy 2001/6/3

转载请注明原文地址:https://www.9cbs.com/read-5966.html

New Post(0)