From owner-freebsd-hackers Tue Feb 3 11:06:05 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA14225 for hackers-outgoing; Tue, 3 Feb 1998 11:06:05 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from mail.stlnet.com (root@mail.stlnet.com [209.96.6.16]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA14197 for ; Tue, 3 Feb 1998 11:05:55 -0800 (PST) (envelope-from xavier@stlnet.com) Received: from stlnet.com (jkump@xavier.stlnet.com [209.96.2.5]) by mail.stlnet.com (8.8.8/8.8.8) with ESMTP id NAA25402 for ; Tue, 3 Feb 1998 13:04:23 -0600 (CST) Message-ID: <34D76A00.3F9F4818@stlnet.com> Date: Tue, 03 Feb 1998 13:03:28 -0600 From: "Jon E. Kump" Organization: Pulitzer Technologies X-Mailer: Mozilla 4.04 [en] (X11; I; BSD/OS 3.1 i386) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.ORG Subject: Problems linking shared libraries with ld Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe hackers" I am writing some code that I am linking in 11 shared libraries and one static library. When ld goes to link the code I get an error from ld. ld: No reference to __DYNAMIC This is my make file that i am using. This program is a little 20 line example. CC = gcc CFLAGS = -g -funroll-loops -Wall -pipe -ansi LDFLAGS = -Bdynamic CPPFLAGS = INCLUDES = -I. -I/usr/X11R6/include -I/usr/local/include LIBDIR = -L/usr/X11R6/lib -L/usr/local/lib LIBS = -lXm -lXpm -lXmu -lXt -lXext -lX11 -lXmHTML -lSM -lICE -ljpeg -lpng -lz -lm LOADLIBES = $(LIBDIR) $(LIBS) OBJS = autosize_html.o all: $(OBJS) autosize_html autosize_html.o: autosize_html.c $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -c $< autosize_html: $(OBJS) ld $(LDFLAGS) $(LOADLIBES) -o autosize_html $(OBJS) and here is the code #include void main(int argc, char **argv) { Widget toplevel; XtAppContext app; toplevel = XtVaAppInitialize(&app, "Demos", NULL, 0, &argc, argv, NULL, NULL); /* make sure we may resize ourselves */ XtVaSetValues(toplevel, XmNallowShellResize, True, NULL); /* create a XmHTML widget but this time enable autosizing */ XtVaCreateManagedWidget("html", xmHTMLWidgetClass, toplevel, XmNvalue, "An AutoSizing XmHTML widget.", XmNresizeWidth, True, XmNresizeHeight, True, NULL); XtRealizeWidget(toplevel); XtAppMainLoop(app); } Thanks for any help in advance Jon E. Kump Please e-mail any response to my address, I don't subscribe to the mailing list -> xavier@stlnet.com -- Jon E. Kump Unix Systems Administrator, Web Programmer, jkump@stlnet.com Systems Programmer xavier@stlnet.com Pulitzer Technologies