Menu

link a mingw object file(.o) in delphi?

2003-12-11
2012-09-26
  • Nobody/Anonymous

    i wanna use the link compiler directive in delphi ({$L filename})  with a mingw compiled object.

    but i get an error:
    [Error] obj.pas(27): Bad object file format: 'E:Projects820000MouseStatemouse.o'

    delphi help says you can only link an Intel relocatable object file (.OBJ file), which i think MSVC++ makes.

    does anyone know how to compile an Intel relocatable object file with mingw/gcc?

     
    • Colin Laplace

      Colin Laplace - 2003-12-11

      th object file format used with gcc (mingw) is not the same as Borland and MSVC++ use. So you won't be able to link with them. One solution is to create a DLL instead of an object file, which you will be able to use in Delphi (using "stdcall" to declare your dll functions in Delphi).

      Greetings,
      Colin

       
    • Kip

      Kip - 2003-12-11

      M$V!C++ .obj != standard object format. I think anon they are talking about coff format.

      Kip

       
      • Nobody/Anonymous

        yeah.. Delphi only imports OMF objects.

        i think mingw is making COFF objects, does anyone know if/how mingw can compile OMF objects or if you can convert COFF objects to OMF objects.

        digital mars claims to have a util coff2omf that converts obj files but its not free.

        ciao

        daniel

         
    • Nobody/Anonymous

      I can't even if I use Dev-Pascal?

       

Log in to post a comment.

MongoDB Logo MongoDB