Page 2 of 2

Posted: Fri Sep 01, 2006 12:45 pm
by jack
also, the lib is likely to use the cdecl calling convention
so try this

Code: Select all

ImportC "Basic2D.lib" 
  dbCls( RGBBackColor.l ) As "_dbCls"
  dbInk( RGBForeColor.l, RGBBackColor.l ) As "_dbInk"
  dbDot( X.l, Y.l ) As "_dbDot"
  dbBox( Left.l, Top.l, Right.l, Bottom.l ) As "_dbBox"
  dbLine( X1.l, Y1.l, X2.l, Y2.l ) "_dbLine"
  dbCircle( X.l, Y.l, Radius.l ) As "_dbCircle"
EndImport 

Posted: Fri Sep 01, 2006 2:56 pm
by freddix
@Jack: thanks for the tips ... it helped find the problem
I must use the decorated form in 'as' :

but now I get error pointing to functions that are probably declared from within the LIB:

POLINK: error: Unresolved external symbol '?dbGetDirect3DDevice@@YAPAUIDirect3DDevice9@XZ'.
POLINK: error: Unresolved external symbol '__ftol2'.
POLINK: error: Unresolved external symbol '__fltused'.
POLINK: fatal error: 3 unresolved external(s)

Maybe I must import firstly the DLL that include the Direct3DDevice setup ?

Code: Select all

Import "Basic2D.lib" 
  dbCls( RGBBackColor.l ) As "?dbCLS@@YAXK@Z"
  dbInk( RGBForeColor.l, RGBBackColor.l ) As "?dbInk@@YAXKK@Z"
  dbDot( X.l, Y.l ) As "?dbDot@@YAXHH@Z"
  dbBox( Left.l, Top.l, Right.l, Bottom.l ) As "?dbBox@@YAXHHHH@Z"
  dbLine( X1.l, Y1.l, X2.l, Y2.l ) As "?dbLine@@YAXHHHH@Z"
  dbCircle( X.l, Y.l, Radius.l ) As "?dbCircle@@YAXHHH@Z"
 EndImport 

Procedure DgdkCLS( RGBColor.l )
  dbCls( RGBColor )
 EndProcedure

Procedure DgdkINK( ForeRGBColor.l, BackRGBColor.l )
  dbInk( ForeRGBColor, BackRGBColor )
 EndProcedure

Procedure DgdkDOT( X.l, Y.l )
  dbDot( X, Y )
 EndProcedure

Procedure DgdkBOX( Left.l, Top.l, Right.l, Bottom.l )
  dbBox( Left, Top, Right, Bottom )
 EndProcedure

Procedure DgdkLINE( X1.l, Y1.l, X2.l, Y2.l )
  dbLine( X1, Y1, X2, Y2 )
 EndProcedure

Procedure DgdkCIRCLE( X.l, Y.l, Radius.l )
  dbCircle( X, Y, Radius )
 EndProcedure

Posted: Fri Sep 01, 2006 3:15 pm
by jack
freddix wrote:Maybe I must import firstly the DLL that include the Direct3DDevice setup ?
looks that way, also add this and see if ftol2 and fltused errors go away.

Code: Select all

ImportC "MSVCRT.LIB" 
EndImport 

Posted: Fri Sep 01, 2006 3:35 pm
by freddix
fltused error does no more appear but ftol2 is always here.