False"Error while linking" in fpc-crosswin and how lazarus / 1-Linux ---------------------------------------------------------------------- Cheb · 2007-02-18 15:37 I here copy my own message from the FPC community board. Note that I do compile my dll not from Lazarus directly but via the shell script (or set the Lazarus IDE to call the same shell script)     ASPLinux 11.2, fpc 2.0.4, fpc_crosswin32 2.0.4-060910     Each compilation of a dll ends with the following messages despite the fact that fpc produces a perfectly working dll:     /usr/bin/fpc-i386-win32-dlltool: Unable to open object file:     /usr/bin/fpc-i386-win32-dlltool: Unable to open object file:     /home/cheb/cge/modules/_demo001/src/_demo001.dpr(79,1) Error: Error while linking     Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)     I wonder: what the hell does it want? What is that "object file" it complains about? I do not link or {$r anything.     -- Anton Rzheshevski, February 15, 2007 04:32 PM    (edit) (attach file) (email) Answers:     Ok, strangely enough I resolved the problem     by writing a wrapper: Code: [Select]     program fpc_i386_win32_dlltool;     {$mode objfpc}{$H+}     uses       Classes, SysUtils, Process;       var         i: integer;         s: ansistring;         AProcess: TProcess;     begin       s:=ParamStr(1);       For i:=2 to ParamCount() do         s:=s + ' ' + ParamStr(i);       WriteLn('wrapping: fpc-i386-win32-dlltool ', s);       AProcess:=TProcess.Create(nil);       AProcess.CommandLine := 'fpc-i386-win32-dlltool-orig '+ s;       AProcess.Options := AProcess.Options + [poWaitOnExit];       AProcess.Execute;       AProcess.Free;     end.     I renamed the original /usr/bin/fpc-i386-win32-dlltool       to "fpc-i386-win32-dlltool-orig", replaced it with my       wrapper... and the error messages just stopped popping.     W.T.F.     -- Anton Rzheshevski, February 18, 2007 04:13 PM P.S. My build.sh (with lots of commands not related to this topic): Code: [Select]rm ../_demo001.dll rm _demo001.dll fpc _demo001.dpr -Twin32 -dcge -dnotlaz -O2 -Op3 -Or -Sd -Sh -Sc -Rintel -Fi../../cge/src  -FU../../../temp -Fu../../../temp ../../../bin/incbuild build.h strip -s _demo001.dll upx _demo001.dll mv _demo001.dll ../ rm ../../../temp/*