Problems compiling new SNMP++ library

Simpson, Gary Gary.Simpson____tfeurope.com
Wed Apr 25 11:23:30 CEST 2001


Hello,

I have struggled for a while to get the new versions of SNMP++ and AGENT++
working on our Solaris machine, as it comes up with the following error:

  g++ -fPIC -shared -D_XPG4_EXTENDED -Dsun -D__unix -I../include -I./
-I../../libdes -g -lelf -lsocket -lnsl address_sh.o counter_sh.o ...
  Text relocation remains                       referenced
      against symbol                 offset     in file
  <unknown>                          oxac8
/opt/sfw/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/libstdc++.a(iovfscanf.o)

  ...

  ld: fatal: relocations remain against allocatable but non-writable
sections
  collect2: ld returned 1 exit status
  *** Error code 1
  make: Fatal error: Command failed for target '../lib/libsnmp++.so'

The problem seems to be that when it is compiling it is referring to
libstdc++.a (statically linked).  Do you know how to change it to use the
dynamically linked libstdc++.so? (or am I completely on the wrong track?).
I am sorry to be bothering you about what is probably a simple problem.  My
makefile is as follows (derived from Makefile.linux):

*** Beginning of makefile ***
COPTIONS = -D_XPG4_EXTENDED -Dsun -D__unix #-D_DEBUG -Wall
TERMOPTS = -I.

USEROPTS = -g
CFLAGS = $<COPTIONS> $<CINCDIRS> $<USEROPTS>
LDFLAGS = $<CFLAGS> -lelf -lsocket -lnsl
SHARED = -fPIC -shared

#
# Compilation rules
#
CC = g++
LD = ld

include common.mk
*** End of makefile ***

Thanks in advance, Gary.


This communication is intended solely for the addressee and is confidential
and not for third party unauthorised distribution. 



More information about the AGENTPP mailing list