www.digitalmars.com         C & C++   DMDScript  

c++ - overloading/template ?

reply Jean-Pierre H. Dumas <jeanpierre.dumas freesbee.fr> writes:
These files did not even compile before 8.34 beta.
Now compile is OK, but making a static lib is a problem,
and of course the linking is not better.

Lib & link not at the same level as sc ?
Or something radicaly wrong with this code ?

This is Amulet 3.0 from Carnegie Mellon U. circa 1998.
Was doing OK with gcc & msvc, at that time.

I am trying to port it to DMC++.
The source is very intricate C++ with a lot of typedefs.
(Base type is same/equivalent, new type has different name,
8.33 was complaining about ambiguous..., the typedefs where not accepted by
8.33)

Jean-Pierre

______________________________________________
lib .\$SCW$.LIB /C /NOI /N /P:64  C:\temp\00C60000.TMP 
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(215482411): Public
'?Am_ANIMATION_STOP  
3VAm_Animation_End_Action  B' already in library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(215482411): Public
'?Am_ANIMATION_WRAP  
3VAm_Animation_End_Action  B' already in library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(215482411): Public
'?Am_ANIMATION_BOUNCE  
3VAm_Animation_End_Action  B' already in library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(22555624): Public
'?Am_CHOICE_SET  3VAm_Choice_How_Set  B' 
already in library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(10862044): Public
'?Am_CHOICE_CLEAR  3VAm_Choice_How_Set  B' 
already in library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(10862044): Public
'?Am_CHOICE_TOGGLE  3VAm_Choice_How_Set  B' 
already in library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(10862040): Public
'?Am_CHOICE_LIST_TOGGLE  
3VAm_Choice_How_Set  B' already in library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(10862032): Public
'?Am_ATTACH_WHERE_HIT  
3VAm_Move_Grow_Where_Attach  B' already in library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_NW  3VAm_Move_Grow_Where_Attach  B' already 
in library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_N  3VAm_Move_Grow_Where_Attach  B' already in 
library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_NE  3VAm_Move_Grow_Where_Attach  B' already 
in library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_E  3VAm_Move_Grow_Where_Attach  B' already in 
library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_SE  3VAm_Move_Grow_Where_Attach  B' already 
in library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_S  3VAm_Move_Grow_Where_Attach  B' already in 
library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_SW  3VAm_Move_Grow_Where_Attach  B' already 
in library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_W  3VAm_Move_Grow_Where_Attach  B' already in 
library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(10862036): Public
'?Am_ATTACH_END_1  
3VAm_Move_Grow_Where_Attach  B' already in library, redefinition ignored.  
..
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(22555624): Public
'?Am_CENTER_ALIGN  3VAm_Alignment  B' already 
in library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(7942676): Public
'?Am_TOP_ALIGN  3VAm_Alignment  B' already in 
library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(10862048): Public
'?Am_BOTTOM_ALIGN  3VAm_Alignment  B' already 
in library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(7942676): Public
'?Am_LEFT_ALIGN  3VAm_Alignment  B' already in 
library, redefinition ignored.  
Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(7942676): Public
'?Am_RIGHT_ALIGN  3VAm_Alignment  B' already in 
library, redefinition ignored.  
ren .\$SCW$.LIB AmLib.LIB
\AmLib.LIB built
Lines Processed: 2311875  Errors: 0  Warnings: 459
Successful build

Linking map:

c:\Am\lib\amulet.lib(opal)  Offset 00B79H Record Type 0091 
 Error 1: Previous Definition Different :
?Am_CHOICE_SET  3VAm_Choice_How_Set  B (const Am_Choice_How_Set Am_CHOICE_SET)
c:\Am\lib\amulet.lib(opal)  Offset 00BA7H Record Type 0091 
 Error 1: Previous Definition Different :
?Am_CHOICE_CLEAR  3VAm_Choice_How_Set  B (const Am_Choice_How_Set 
Am_CHOICE_CLEAR)
c:\Am\lib\amulet.lib(opal)  Offset 00BD6H Record Type 0091 
 Error 1: Previous Definition Different :
?Am_CHOICE_TOGGLE  3VAm_Choice_How_Set  B (const Am_Choice_How_Set 
Am_CHOICE_TOGGLE)
c:\Am\lib\amulet.lib(opal)  Offset 00C10H Record Type 0091 
 Error 1: Previous Definition Different :
?Am_CHOICE_LIST_TOGGLE  3VAm_Choice_How_Set  B (const Am_Choice_How_Set 
Am_CHOICE_LIST_TOGGLE)
c:\Am\lib\amulet.lib(opal)  Offset 00C4AH Record Type 0091 
 Error 1: Previous Definition Different :
?Am_ATTACH_WHERE_HIT  3VAm_Move_Grow_Where_Attach  B (const 
Am_Move_Grow_Where_Attach Am_ATTACH_WHERE_HIT)
c:\Am\lib\amulet.lib(opal)  Offset 00C83H Record Type 0091 
 Error 1: Previous Definition Different :
?Am_ATTACH_NW  3VAm_Move_Grow_Where_Attach  B (const Am_Move_Grow_Where_Attach 
Am_ATTACH_NW)
c:\Am\lib\amulet.lib(opal)  Offset 00CB5H Record Type 0091 
 Error 1: Previous Definition Different :
?Am_ATTACH_N  3VAm_Move_Grow_Where_Attach  B (const Am_Move_Grow_Where_Attach 
Am_ATTACH_N)
c:\Am\lib\amulet.lib(opal)  Offset 00CEEH Record Type 0091 
 Error 1: Previous Definition Different :
?Am_ATTACH_NE  3VAm_Move_Grow_Where_Attach  B (const Am_Move_Grow_Where_Attach 
Am_ATTACH_NE)
c:\Am\lib\amulet.lib(opal)  Offset 00D20H Record Type 0091 
 Error 1: Previous Definition Different :
?Am_ATTACH_E  3VAm_Move_Grow_Where_Attach  B (const Am_Move_Grow_Where_Attach 
Am_ATTACH_E)
c:\Am\lib\amulet.lib(opal)  Offset 00D59H Record Type 0091 
 Error 1: Previous Definition Different :
?Am_ATTACH_SE  3VAm_Move_Grow_Where_Attach  B (const Am_Move_Grow_Where_Attach 
Am_ATTACH_SE)
c:\Am\lib\amulet.lib(opal)  Offset 00D8BH Record Type 0091 
 Error 1: Previous Definition Different :
?Am_ATTACH_S  3VAm_Move_Grow_Where_Attach  B (const Am_Move_Grow_Where_Attach 
Am_ATTACH_S)
c:\Am\lib\amulet.lib(opal)  Offset 00DC4H Record Type 0091 
 Error 1: Previous Definition Different :
?Am_ATTACH_SW  3VAm_Move_Grow_Where_Attach  B (const Am_Move_Grow_Where_Attach 
Am_ATTACH_SW)
..
Apr 27 2003
parent "Walter" <walter digitalmars.com> writes:
What's happening is various functions are getting defined twice in different
.obj files. Try and see which .obj files define the same functions.

"Jean-Pierre H. Dumas" <jeanpierre.dumas freesbee.fr> wrote in message
news:1103_1051465448 news.digitalmars.com...
 These files did not even compile before 8.34 beta.
 Now compile is OK, but making a static lib is a problem,
 and of course the linking is not better.

 Lib & link not at the same level as sc ?
 Or something radicaly wrong with this code ?

 This is Amulet 3.0 from Carnegie Mellon U. circa 1998.
 Was doing OK with gcc & msvc, at that time.

 I am trying to port it to DMC++.
 The source is very intricate C++ with a lot of typedefs.
 (Base type is same/equivalent, new type has different name,
 8.33 was complaining about ambiguous..., the typedefs where not accepted
by 8.33)
 Jean-Pierre

 ______________________________________________
 lib .\$SCW$.LIB /C /NOI /N /P:64  C:\temp\00C60000.TMP
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(215482411):
Public '?Am_ANIMATION_STOP
 3VAm_Animation_End_Action  B' already in library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(215482411):
Public '?Am_ANIMATION_WRAP
 3VAm_Animation_End_Action  B' already in library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(215482411):
Public '?Am_ANIMATION_BOUNCE
 3VAm_Animation_End_Action  B' already in library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(22555624): Public
'?Am_CHOICE_SET 3VAm_Choice_How_Set B'
 already in library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(10862044): Public
'?Am_CHOICE_CLEAR 3VAm_Choice_How_Set B'
 already in library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(10862044): Public
'?Am_CHOICE_TOGGLE 3VAm_Choice_How_Set B'
 already in library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(10862040): Public
'?Am_CHOICE_LIST_TOGGLE
 3VAm_Choice_How_Set  B' already in library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(10862032): Public
'?Am_ATTACH_WHERE_HIT
 3VAm_Move_Grow_Where_Attach  B' already in library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_NW 3VAm_Move_Grow_Where_Attach B' already
 in library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_N 3VAm_Move_Grow_Where_Attach B' already in
 library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_NE 3VAm_Move_Grow_Where_Attach B' already
 in library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_E 3VAm_Move_Grow_Where_Attach B' already in
 library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_SE 3VAm_Move_Grow_Where_Attach B' already
 in library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_S 3VAm_Move_Grow_Where_Attach B' already in
 library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_SW 3VAm_Move_Grow_Where_Attach B' already
 in library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB: Public
'?Am_ATTACH_W 3VAm_Move_Grow_Where_Attach B' already in
 library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(10862036): Public
'?Am_ATTACH_END_1
 3VAm_Move_Grow_Where_Attach  B' already in library, redefinition ignored.
 ..
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(22555624): Public
'?Am_CENTER_ALIGN 3VAm_Alignment B' already
 in library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(7942676): Public
'?Am_TOP_ALIGN 3VAm_Alignment B' already in
 library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(10862048): Public
'?Am_BOTTOM_ALIGN 3VAm_Alignment B' already
 in library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(7942676): Public
'?Am_LEFT_ALIGN 3VAm_Alignment B' already in
 library, redefinition ignored.
 Warning: C:\TEMP\AMULET3.0\SRC\_WIN\SYMANTEC\.\$SCW$.LIB(7942676): Public
'?Am_RIGHT_ALIGN 3VAm_Alignment B' already in
 library, redefinition ignored.
 ren .\$SCW$.LIB AmLib.LIB
 \AmLib.LIB built
 Lines Processed: 2311875  Errors: 0  Warnings: 459
 Successful build

 Linking map:

 c:\Am\lib\amulet.lib(opal)  Offset 00B79H Record Type 0091
  Error 1: Previous Definition Different :
?Am_CHOICE_SET 3VAm_Choice_How_Set B (const Am_Choice_How_Set Am_CHOICE_SET)
 c:\Am\lib\amulet.lib(opal)  Offset 00BA7H Record Type 0091
  Error 1: Previous Definition Different :
?Am_CHOICE_CLEAR 3VAm_Choice_How_Set B (const Am_Choice_How_Set
 Am_CHOICE_CLEAR)
 c:\Am\lib\amulet.lib(opal)  Offset 00BD6H Record Type 0091
  Error 1: Previous Definition Different :
?Am_CHOICE_TOGGLE 3VAm_Choice_How_Set B (const Am_Choice_How_Set
 Am_CHOICE_TOGGLE)
 c:\Am\lib\amulet.lib(opal)  Offset 00C10H Record Type 0091
  Error 1: Previous Definition Different :
?Am_CHOICE_LIST_TOGGLE 3VAm_Choice_How_Set B (const Am_Choice_How_Set
 Am_CHOICE_LIST_TOGGLE)
 c:\Am\lib\amulet.lib(opal)  Offset 00C4AH Record Type 0091
  Error 1: Previous Definition Different :
?Am_ATTACH_WHERE_HIT 3VAm_Move_Grow_Where_Attach B (const
 Am_Move_Grow_Where_Attach Am_ATTACH_WHERE_HIT)
 c:\Am\lib\amulet.lib(opal)  Offset 00C83H Record Type 0091
  Error 1: Previous Definition Different :
?Am_ATTACH_NW 3VAm_Move_Grow_Where_Attach B (const Am_Move_Grow_Where_Attach
 Am_ATTACH_NW)
 c:\Am\lib\amulet.lib(opal)  Offset 00CB5H Record Type 0091
  Error 1: Previous Definition Different :
?Am_ATTACH_N 3VAm_Move_Grow_Where_Attach B (const Am_Move_Grow_Where_Attach
 Am_ATTACH_N)
 c:\Am\lib\amulet.lib(opal)  Offset 00CEEH Record Type 0091
  Error 1: Previous Definition Different :
?Am_ATTACH_NE 3VAm_Move_Grow_Where_Attach B (const Am_Move_Grow_Where_Attach
 Am_ATTACH_NE)
 c:\Am\lib\amulet.lib(opal)  Offset 00D20H Record Type 0091
  Error 1: Previous Definition Different :
?Am_ATTACH_E 3VAm_Move_Grow_Where_Attach B (const Am_Move_Grow_Where_Attach
 Am_ATTACH_E)
 c:\Am\lib\amulet.lib(opal)  Offset 00D59H Record Type 0091
  Error 1: Previous Definition Different :
?Am_ATTACH_SE 3VAm_Move_Grow_Where_Attach B (const Am_Move_Grow_Where_Attach
 Am_ATTACH_SE)
 c:\Am\lib\amulet.lib(opal)  Offset 00D8BH Record Type 0091
  Error 1: Previous Definition Different :
?Am_ATTACH_S 3VAm_Move_Grow_Where_Attach B (const Am_Move_Grow_Where_Attach
 Am_ATTACH_S)
 c:\Am\lib\amulet.lib(opal)  Offset 00DC4H Record Type 0091
  Error 1: Previous Definition Different :
?Am_ATTACH_SW 3VAm_Move_Grow_Where_Attach B (const Am_Move_Grow_Where_Attach
 Am_ATTACH_SW)
 ..
May 03 2003