请问怎样在Delphi中连接一个obj文件,怎样做

解决方案 »

  1.   

    Linking to object filesTo call routines from a separately compiled object file, first link the object file to your application using the $L (or $LINK) compiler directive. For example,On Windows: {$L BLOCK.OBJ}
    On Linux:   {$L block.o}links BLOCK.OBJ (Windows) or block.o (Linux) into the program or unit in which it occurs. Next, declare the functions and procedures that you want to call:procedure MoveWord(var Source, Dest; Count: Integer); external;procedure FillWord(var Dest; Data: Integer; Count: Integer); external;Now you can call the MoveWord and FillWord routines from BLOCK.OBJ (Windows) or block.o (Linux).