[fpc-devel]c -> fpc

Peter Beisel beisel at kbprueftechnik.frm.de
Mon Mar 4 15:33:03 CET 2002


Thank you very much,
I tried what you told me.
1. from the IDE: no error message but also no EXE-file
2. from the IDE: with option: "Call linker after": Error message : cannot open
-llib1.a no such file or directory (ENOENT) (lib1.a is my archiv)
3. from command line (DOS)  Error message : cannot open -lc:\t2\lib1.a no such
file or directory (ENOENT) (but there is the file c:\t2\lib1.a)

My lib1.a was created with DJGPP - but do I need special compiler switches?
Examining my lib1.a with a hex-editor: !<arch>  are the first charakters - seems
realy to be an archive file.
Projekt folder: c:\t2
Lib Path: c:\t2
File Path: c:\t2
Location of the lib1.a file: C:\t2\lib1.a

But the linker tells me in any case: connot open -lLib1.a no such file or
directory (ENOENT)
Could it be the format is wrong?


What's about the compiler switches is found in the example gdbint.pp:

{$ifdef go32v2}
  {$undef NotImplemented}
  { ifdef GDB_V418 changed to ifndef GDB_V416}
  {$ifdef USE_GDB_OBJS}
    {$include gdbobjs.inc}
  {$else USE_GDB_OBJS}
    {$LINKLIB gdb}
    {$ifdef GDB_V5}
      {$LINKLIB bfd}
      {$LINKLIB readline}
      {$LINKLIB opcodes}
      {$LINKLIB history}
      {$LINKLIB iberty}
    {$endif GDB_V5}
  {$endif ndef USE_GDB_OBJS}
  {$LINKLIB dbg}
  {$LINKLIB c}
{$endif go32v2}

Have I to use them?

Regards, Peter






Marco van de Voort schrieb:

> > How can a library generated by DJGPP linked into a FPC program ??
> > -----------------------------------------------------------------
>
> {$linklib <libname>}
>
> and make sure your searchpath (-Fl) is ok.
>
> See packages/base/gdbint/gdbint.pp (or packages/gdbint/gdbint.pp if you have
> older sources) as an example. (links in several libs for the debugger support
> of the IDE)
>
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel





More information about the fpc-devel mailing list