Board index » delphi » linking C obj file into Delphi EXE

linking C obj file into Delphi EXE

Dear fellow Delphites,

Is there a way to link  an obj file compiled in C into an executable created
in Delph 3? If yes, what is the syntax?

I tried using $L compiler directive but it didn't work.

Thanks in advance.

- Srinivas Junnuru

 

Re:linking C obj file into Delphi EXE


On Sat, 2 May 1998 20:38:30 -0500, "Srinivas Junnuru"

Quote
<sjunn...@rconnect.com> wrote:
>Is there a way to link  an obj file compiled in C into an executable created
>in Delph 3? If yes, what is the syntax?

>I tried using $L compiler directive but it didn't work.

From the Delphi 3 documentation:

"Syntax    {$L filename}
        {$LINK filename}
Scope   Local
Remarks

The $L parameter instructs the compiler to link the named file with
the program or unit being compiled. The $L directive is used to link
with code written in other languages for procedures and functions
declared to be external. The named file must be an Intel relocatable
object file (.OBJ file). The default extension for filename is .OBJ.
If filename does not specify a directory path, then, in addition to
searching for the file in the same directory as the current module,
Delphi searches in the directories specified in the Search path input
box on the Directories/Conditionals page of the Project|Options dialog
box (or in the directories specified in a /O option on the DCC32
command line). For further details about linking with assembly
language, see online Help."

Perhaps Delphi cannot find the .obj file?

Other Threads