This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]