This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC 2.9 on AIX 5L V5.1
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: "Helmut Schröger" <helmut dot schroeger at rl-ag dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 04 Aug 2003 11:14:00 -0400
- Subject: Re: GCC 2.9 on AIX 5L V5.1
>>>>> Helmut Schröger writes:
>> type gcc: gcc is /usr/bin/gcc
>> gcc --version: 2.9-aix51-020209
>> oslevel -r: 5100-04
The version of GCC you are using is not based on an FSF release,
so this is the wrong forum for asking question.
Helmut> Now i try to link my main.o with the previous built libraries. This is
Helmut> the point i am not sure how it should work. I tried:
>> gcc -o main main.o -L. -lf -lfoo
Helmut> Results in:
Helmut> ld: 0706-006 Cannot find or open library file: -l foo
Helmut> ld:open(): No such file or directory
Helmut> collect2: ld returned 255 exit status
Helmut> and
>> gcc -o main -brtl -L. -lf -lfoo
Helmut> Results in:
Helmut> ld: 0706-006 Cannot find or open library file: -l foo
Helmut> ld:open(): No such file or directory
Helmut> ld: 0706-005 Cannot find or open file: libgcc.a
Helmut> ld:open(): No such file or directory
Helmut> ld: 0706-005 Cannot find or open file: libgcc.a
Helmut> ld:open(): No such file or directory
Helmut> gcc: file path prefix
Helmut> `/opt/freeware/GNUPro/lib/gcc-lib/rtl/2.9-aix51-020209/' never used
This is all user error. AIX shared libraries do not use the ".so"
file extension by default, so the AIX linker will not notice the libfoo.so
file. One can enable Solaris-style linking behavior with the AIX linker
-brtl flag that enables both ".so" file extension for shared libraries and
runtime linking semantics. The GCC commandline method for passing options
to the linker is to prepend the option with "-Wl," in other words
"-Wl,-brtl". The "-b" option has its own meaning to GCC.
David