Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HP-UX11 porting

Status
Not open for further replies.

abp

Programmer
Sep 14, 2000
134
FR
I am trying to link an executable on HP-UX11. It doesnt use any shared libraries
(single executable). There are about 8-10 C++ source files linked together to make a
single executable. I am not using any LD_FLAGS. If I try to run the executable I am
getting these errors.

hpln1[NoSource]:core>Tiff2Avi
/usr/lib/dld.sl: Unresolved symbol: __head (data) from /usr/lib/libC.2
/usr/lib/dld.sl: Unresolved module for symbol: _main (code)
from Tiff2Avi
IOT trap (core dumped)

Please help.

-Anand Pillai,
anand_pillai@delmia.com
 
Anand,

Can you compile and link a trivial program?

I you can, could you then increase the complexity of an example program to try and reproduce the error?
Mike
michael.j.lacey@ntlworld.com
 
Here is the makefile I was using:

ARCH_CC = /bin/cc -I/usr/include/X11R5 -I/usr/include
ARCH_C++ = /opt/aCC/bin/aCC
ARCH_SHELL = /bin/sh
ARCH_MAKEFILE_LOC = Makefile

ARCH_CFLAGS = +Z -DHP_700 -D_HPUX_SOURCE -DBSD
ARCH_LDFLAGS_OUTP = -o
ARCH_LDFLAGS = -s -Wl,-Z
ARCH_OBJ_EXT = .o
ARCH_SO_EXT = .sl
ARCH_EXE_EXT =
ARCH_LIB_EXT = .a

ARCH_MAKEFILE = $(DMAKEFILE)
ARCH_ARCHIVE = ar
ARCH_LD = /opt/aCC/bin/aCC
#ARCH_LD = ld
ARCH_ECHO = echo
ARCH_EXIT = exit
ARCH_MV = mv
ARCH_CP = cp
ARCH_RM = rm -f
ARCH_MAKE = make
ARCH_SHELL = /bin/sh
ARCH_STRIP = strip
ARCH_SYS_DEP = -lm -lc -lC

I removed the "-lC" option to the linker to prevent linking with libC archives.
The error has disappeared now.

Thanks for the reply Mike

-Anand
anand_pillai@delmia.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top