public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem creating shared object with gcc on AIX 4.3.3
@ 2002-01-17  0:18 P S Suresh
  2002-01-17  0:45 ` David Edelsohn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: P S Suresh @ 2002-01-17  0:18 UTC (permalink / raw)
  To: gcc, gcc

[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]

Hi,

We have a problem regarding shared library using gcc on AIX 4.3.3.

The command used to create shared objects using gcc is "gcc -fPIC
-shared". If we use gcc on AIX with the same command we get the
following:-

$ make -f makefile
gcc -fPIC -I../include -shared -DXP_UNIX -o sample.so sample.c
cc1: warning: -fPIC ignored for AIX (all code is position independent)
ld: 0711-317 ERROR: Undefined symbol: .GetFirstRecipient
ld: 0711-317 ERROR: Undefined symbol: .GetRecipientAddress
ld: 0711-317 ERROR: Undefined symbol: .GetControlData
ld: 0711-317 ERROR: Undefined symbol: .FreeControlData
ld: 0711-317 ERROR: Undefined symbol: .AddRecipient
ld: 0711-317 ERROR: Undefined symbol: .GetMessageFile
ld: 0711-317 ERROR: Undefined symbol: .GetPostOfficePath
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
make: *** [sample.so] Error 1

The copy of makefile is attached herewith.

Request assistance to resolve this problem on gcc with AIX. Thanks in
advance.
Regards,

Suresh



[-- Attachment #2: makefile.txt --]
[-- Type: text/plain, Size: 955 bytes --]

# NETSCAPE COMMUNICATIONS CORPORATION
#
# Copyright (c) 1998 Netscape Communications Corporation.
# All Rights Reserved.
#
# Use of this Source Code is subject to the terms of the applicable
# license agreement from Netscape Communications Corporation.
#
# The copyright notice(s) in this Source Code does not indicate
# actual or intended publication of this Source Code.
#
# Sample Makefile for Netscape Messaging Server Plugin

# Name of the plugin to build
TARGET=sample

# Use one of the following
SHARED_SUFFIX=so

# Use one of the following
CC=gcc -fPIC -I../include -shared
#CC=cc -KPIC -I../include -G

# Use one of the following
FLAGS = -DXP_UNIX
#FLAGS = -DXP_WIN32

# Use zero or more of the following
#FLAGS += -D_DEBUG

all: $(TARGET).$(SHARED_SUFFIX)

$(TARGET).$(SHARED_SUFFIX): $(TARGET).c ../include/msg4plugins.h
        $(CC) $(FLAGS) -o $(TARGET).$(SHARED_SUFFIX) $(TARGET).c
sample.o

clean:
        rm -f $(TARGET).$(SHARED_SUFFIX)

[-- Attachment #3: Card for P.S.Suresh --]
[-- Type: text/x-vcard, Size: 319 bytes --]

begin:vcard 
n:;
tel;fax:+9714 2012305
tel;work:+9714 2012353
x-mozilla-html:FALSE
org:National Bank of Dubai;Information Systems & Technology
version:2.1
email;internet:sureshs@nbd.co.ae
title:Project Leader
adr;quoted-printable:;;Baniyas Road,=0D=0AP.O. Box 777,;;Dubai;;United Arab Emirates
fn:Suresh P.S.
end:vcard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Problem creating shared object with gcc on AIX 4.3.3
  2002-01-17  0:18 Problem creating shared object with gcc on AIX 4.3.3 P S Suresh
  2002-01-17  0:45 ` David Edelsohn
@ 2002-01-17  0:45 ` P S Suresh
  2002-01-17  1:09 ` Craig Rodrigues
  2 siblings, 0 replies; 4+ messages in thread
From: P S Suresh @ 2002-01-17  0:45 UTC (permalink / raw)
  To: gcc, gcc

[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]

Hi,

We have a problem regarding shared library using gcc on AIX 4.3.3.

The command used to create shared objects using gcc is "gcc -fPIC
-shared". If we use gcc on AIX with the same command we get the
following:-

$ make -f makefile
gcc -fPIC -I../include -shared -DXP_UNIX -o sample.so sample.c
cc1: warning: -fPIC ignored for AIX (all code is position independent)
ld: 0711-317 ERROR: Undefined symbol: .GetFirstRecipient
ld: 0711-317 ERROR: Undefined symbol: .GetRecipientAddress
ld: 0711-317 ERROR: Undefined symbol: .GetControlData
ld: 0711-317 ERROR: Undefined symbol: .FreeControlData
ld: 0711-317 ERROR: Undefined symbol: .AddRecipient
ld: 0711-317 ERROR: Undefined symbol: .GetMessageFile
ld: 0711-317 ERROR: Undefined symbol: .GetPostOfficePath
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
make: *** [sample.so] Error 1

The copy of makefile is attached herewith.

Request assistance to resolve this problem on gcc with AIX. Thanks in
advance.
Regards,

Suresh



[-- Attachment #2: makefile.txt --]
[-- Type: text/plain, Size: 955 bytes --]

# NETSCAPE COMMUNICATIONS CORPORATION
#
# Copyright (c) 1998 Netscape Communications Corporation.
# All Rights Reserved.
#
# Use of this Source Code is subject to the terms of the applicable
# license agreement from Netscape Communications Corporation.
#
# The copyright notice(s) in this Source Code does not indicate
# actual or intended publication of this Source Code.
#
# Sample Makefile for Netscape Messaging Server Plugin

# Name of the plugin to build
TARGET=sample

# Use one of the following
SHARED_SUFFIX=so

# Use one of the following
CC=gcc -fPIC -I../include -shared
#CC=cc -KPIC -I../include -G

# Use one of the following
FLAGS = -DXP_UNIX
#FLAGS = -DXP_WIN32

# Use zero or more of the following
#FLAGS += -D_DEBUG

all: $(TARGET).$(SHARED_SUFFIX)

$(TARGET).$(SHARED_SUFFIX): $(TARGET).c ../include/msg4plugins.h
        $(CC) $(FLAGS) -o $(TARGET).$(SHARED_SUFFIX) $(TARGET).c
sample.o

clean:
        rm -f $(TARGET).$(SHARED_SUFFIX)

[-- Attachment #3: Card for P.S.Suresh --]
[-- Type: text/x-vcard, Size: 319 bytes --]

begin:vcard 
n:;
tel;fax:+9714 2012305
tel;work:+9714 2012353
x-mozilla-html:FALSE
org:National Bank of Dubai;Information Systems & Technology
version:2.1
email;internet:sureshs@nbd.co.ae
title:Project Leader
adr;quoted-printable:;;Baniyas Road,=0D=0AP.O. Box 777,;;Dubai;;United Arab Emirates
fn:Suresh P.S.
end:vcard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem creating shared object with gcc on AIX 4.3.3
  2002-01-17  0:18 Problem creating shared object with gcc on AIX 4.3.3 P S Suresh
@ 2002-01-17  0:45 ` David Edelsohn
  2002-01-17  0:45 ` P S Suresh
  2002-01-17  1:09 ` Craig Rodrigues
  2 siblings, 0 replies; 4+ messages in thread
From: David Edelsohn @ 2002-01-17  0:45 UTC (permalink / raw)
  To: P S Suresh; +Cc: gcc

	Read the AIX online documentation about creating shared
libraries, including -berok and -G options to the AIX linker (accessed
through GCC using -Wl,-berok and -Wl,-G).

David

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem creating shared object with gcc on AIX 4.3.3
  2002-01-17  0:18 Problem creating shared object with gcc on AIX 4.3.3 P S Suresh
  2002-01-17  0:45 ` David Edelsohn
  2002-01-17  0:45 ` P S Suresh
@ 2002-01-17  1:09 ` Craig Rodrigues
  2 siblings, 0 replies; 4+ messages in thread
From: Craig Rodrigues @ 2002-01-17  1:09 UTC (permalink / raw)
  To: P S Suresh; +Cc: gcc

Hi,

Jens-Uwe Mager maintains a web page which has some of the
best documentation outside of IBM on the AIX linker:
http://www.han.de/~jum/aix/

This might help you learn about compiling shared libraries
on AIX.
-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@mediaone.net          

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-01-17  5:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-17  0:18 Problem creating shared object with gcc on AIX 4.3.3 P S Suresh
2002-01-17  0:45 ` David Edelsohn
2002-01-17  0:45 ` P S Suresh
2002-01-17  1:09 ` Craig Rodrigues

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).