[fpc-pascal] -Twin32 linker woes

Adriaan van Os fpc at microbizz.nl
Thu Mar 11 11:53:00 CET 2010


I am cross compiling with fpc svn trunk and -Twin32 on i386 Mac OS X to Win32. This works fine, 
except that {$linklib xxx.dll} says

	error: 1: Import library not found for xxx

Same result with {$linklib xxx}. The dll (and dll.lib) are absolutely there, {$linklib xxx.dll.lib} 
says

	error: 8: Invalid DLL xxx.dll.lib, Dos Header invalid

I tried several dll's, all with the same result. Next, I built and installed mingw binutils-2.20 
(--target=i686-pc-mingw32 --host=i686-apple-darwin8 --build=i686-apple-darwin8 --prefix=/usr/local) 
to link external (without the {$linklib}) and got

	ld warning: option -b is obsolete and being ignored
	ld: file not found: pe-i386

Well, one solution is to link at runtime, but I am grateful for hints at what can be wrong (the 
same dll links fine with another compiler).

Regards,

Adriaan van Os




More information about the fpc-pascal mailing list