#107 link error on Solaris Sparc with GCC

v1.0 (example)
open
cpptasks (103)
5
2004-09-14
2004-09-14
No

I'm trying to compile and link with GCC, but I obtain the
following errors. I find a the error, but I didn't find a
workaround.

<target name="libGCC" >
<cc objdir="${clib}" outtype="shared"
name="gcc" outfile="${clib}/fircoAgent">
<libset dir="${lib}" libs="FKCOMM" />
<sysincludepath
location="${javahome}/include" />
<sysincludepath
location="${javahome}/include/solaris" />
<sysincludepath location="${include}" />
<fileset dir="${c}">
<include name="*.c" />
</fileset>
<libset libs="c,nsl,socket" />
</cc>
</target>

ant -v libGCC

libGCC:
[cc] Starting dependency analysis for 1 files.
[cc]
Parsing ../c/ca_expertus_payment_io_blc_fircostp_FircoA
gent.h
[cc] 0 files are up to date.
[cc] 1 files to be recompiled from dependency
analysis.
[cc] 1 total files to be compiled.
[cc] gcc -c -fPIC -I/usr/j2se/include -
I/usr/j2se/include/solaris -I/export/home/monetis/dev-
expertus/paiement_2.0/include /export/home/monetis/de
v-expertus/paiement_2.0/c/fircoAgent.c
[cc] Starting link
[cc] gcc -shared -o libfircoAgent.so fircoAgent.o -
L/export/home/monetis/dev-expertus/paiement_2.0/lib -
lFKCOMM -lc -lnsl -lsocket
[cc] Text relocation remains
referenced
[cc] against symbol offset in file
[cc] <unknown>
0x15e0 /export/home/monetis/dev-
expertus/paiement_2.0/lib/libFKCOMM.a(STSTR.o)
[cc] <unknown>

SOLUTION : just change to param order.
gcc -shared -o libfircoAgent.so -
L/export/home/monetis/dev-expertus/paiement_2.0/lib -
lFKCOMM -lc -lnsl -lsocket fircoAgent.o

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks