Forum > Other
Freebsd CGI Compile Linking Error
(1/1)
darkaxi0m:
FPC Version 2.5.1
Laz Version 0.9.29
Im trying to cross compile a FreeBSD CGI program from my windows box.
It works fine, until i add a IdTCPclient to the webModule i get the following linking error
--- Code: ---Hint: Start of reading config file C:\pp\bin\i386-win32\fpc.cfg
Hint: End of reading config file C:\pp\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 2.5.1 [2010/12/02] for i386
Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: FreeBSD/ELF for i386
Compiling cgiproject1.lpr
Compiling unit1.pas
cgiproject1.lpr(6,8) Hint: Unit "fpWeb" not used in cgiproject1
Compiling resource cgiproject1.or
Linking cgiproject1
C:\pp\bin\i386-win32\i386-freebsd-ld.exe: cannot find -liconv
cgiproject1.lpr(14,1) Error: Error while linking
C:\pp\bin\i386-win32\i386-freebsd-ld.exe: cannot find -liconv
cgiproject1.lpr(14,1) Error: Error while linking
cgiproject1.lpr(14,1) Fatal: There were 1 errors compiling module, stopping
--- End code ---
Any ideas? thanks
marcov:
This is normal, and a general *nix platforms "feature" (problem). All used dynamic libraries must be present on the system at linking time.
Read the buildfaq for more background information on crosscompiling:
http://www.stack.nl/~marcov/buildfaq/
darkaxi0m:
thankyou for that,
ive copied libiconv.a from my freebsd box to my windows.
but now ive come across this
--- Quote ---Hint: Start of reading config file C:\pp\bin\i386-win32\fpc.cfg
Hint: End of reading config file C:\pp\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 2.5.1 [2010/12/04] for i386
Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: FreeBSD/ELF for i386
Compiling cgiproject1.lpr
Compiling unit1.pas
cgiproject1.lpr(6,8) Hint: Unit "fpWeb" not used in cgiproject1
Compiling resource cgiproject1.or
Linking cgiproject1
C:\pp\bin\i386-win32\i386-freebsd-ld.exe: cannot find -lc
cgiproject1.lpr(14,1) Error: Error while linking
C:\pp\bin\i386-win32\i386-freebsd-ld.exe: cannot find -lc
cgiproject1.lpr(14,1) Error: Error while linking
cgiproject1.lpr(14,1) Fatal: There were 1 errors compiling module, stopping
--- End quote ---
and idea what library it is looking for?
theo:
--- Quote from: darkaxi0m on December 05, 2010, 09:52:19 am ---
--- Quote ---cannot find -lc
--- End quote ---
and idea what library it is looking for?
--- End quote ---
Libc afaics.
http://wiki.freepascal.org/libc_unit
marcov:
--- Quote from: theo on December 05, 2010, 12:03:14 pm ---
--- Quote from: darkaxi0m on December 05, 2010, 09:52:19 am ---
--- Quote ---cannot find -lc
--- End quote ---
and idea what library it is looking for?
--- End quote ---
Libc afaics.
http://wiki.freepascal.org/libc_unit
--- End quote ---
That URL is mostly unrelated. Nearly every C program needs libc.so and probably also libgcc.so
Navigation
[0] Message Index