| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Borland 3.1 Question |
GM> > Linker error Cstring::operator=(const char near& ) defined in cstring.cpp > is duplicated in cstring.cpp. GM> This is known as The Single Copy Problem. It applies to all sorts of things that the compiler needs to instantiate, such as templates, virtual function tables, and (as in this case) out-of-line inline functions. Different C++ compilers solve this in different ways. Borland C++ uses an extension to Intel's Object Module Format in its linker so that all separately compiled instances of virtual function tables and templates are combined into one by the linker. I don't remember what happens in the case of out-of-line inline functions in older versions of Borland C++, such as yours. I do know, however, that it was explicitly stated recently by the ISO Working Party on the Draft C++ standard that inline functions should default to internal and not external linkage (which solves the problem another way). If I remember correctly, there is a compiler switch (-vi ?) to enable all inline functions to be actually generated inline, instead of being generated out-of-line in every translation unit that uses them. You may have to turn this switch on. > JdeBP < ___ X MegaMail 2.10 #0: --- Maximus/2 2.02* Origin: DoNoR/2,Woking UK (44-1483-722344) (2:440/4) SEEN-BY: 105/42 620/243 624/50 711/401 409 410 413 430 807 808 809 934 955 SEEN-BY: 712/407 515 628 704 713/888 800/1 7877/2809 @PATH: 440/4 141/209 270/101 396/1 3615/50 105/103 42 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.