[fpc-pascal] Linking with putty C code, various linker errors

Tobias Giesen tobiasgiesen at gmail.com
Wed Oct 9 11:45:27 CEST 2019


Hello again,

here's a quick update, I decided to make a DLL instead. Much easier and
cleaner. Making good progress. Will publish when done.

Cheers,
Tobias

On Tue, Oct 8, 2019 at 6:50 PM <tobiasgiesen at gmail.com> wrote:

> Hello,
> I am trying to make an SFTP client class based on putty. It will be open
> source and I think quite useful
> for many people, but it looks like I need some help :=)
>
> I need to link in over 100 .o files compiled with gcc.
> I am using the fpc 3.1.1 snapshot on Win64 for now.
>
> ISSUE #1:
> Undefined symbol: fopen
> this line does not help:
> function fopen(filename: PAnsiChar; mode: PAnsiChar): Pointer; cdecl;
> external 'MSVCRT.DLL' name 'fopen';
> It works only when I write the function myself using cdecl; export;
> Can this be fixed?
>
> ISSUE #2:
> Undefined symbol: __imp_isspace
> Undefined symbol: __imp_GetTickCount
> and similar ones ... I think gcc added the __imp prefix ...
> apparently I need to add an import library, but how?
>
> Overall the linker errors are not so many and I believe it will eventually
> work.
>
> Cheers,
> Tobias
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20191009/6920cba1/attachment.html>


More information about the fpc-pascal mailing list