🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Sho Kuwamoto Wed, 05 Jul 1989 04:41
g++ and sunview (again)
#27
Author: Sho Kuwamoto
Date: Wed, 05 Jul 1989 04:41
36 lines
1518 bytes
This may be some quirk in SunView, but my troubles with g++ and
sunview seem to come from some fundamental misunderstanding on my part
of g++ linkage.  After reducing the program as much as possible, I
came up with this:

--file test.cc
extern "C"{
#include <suntool/sunview.h>
}

main()
{
  Frame frame;
  frame = window_create(0, FRAME, 0);
}
--
g++ test.cc -I/usr3/sho/include/c++ -lsuntool -lsunwindow -lpixrect
--
which gives me the error:
pf.o: Undefined symbol __DYNAMIC referenced from text

where .../include/c++ contains the slightly mangled sunview .h files.
voss@cs.uiuc.edu suggested I make all my sunview calls from gcc and
link together.  Well, to make it as simple as possible, I removed the
extern "C" declaration and compiled with gcc to get an object file.  I
linked it with the sunview libraries using the g++ linker, and I got
the same error.  Are the sunview libraries incompatible with g++?  Or
am I linking C code and C++ code together incorrectly?  I am running
g++ 1.35.0 and gcc 1.35.

-Sho



-- 
address: sho@risc.com <-- NOTE:  Not the same as above.
Re: g++ and sunview (again)
#35
Author: Roy Marantz
Date: Tue, 11 Jul 1989 16:57
22 lines
1132 bytes
In article <2343@pur-phy> sho@pur-phy (Sho Kuwamoto) writes:

> This may be some quirk in SunView, but my troubles with g++ and
> sunview seem to come from some fundamental misunderstanding on my part
> of g++ linkage.  After reducing the program as much as possible, I
> came up with this:

...

> pf.o: Undefined symbol __DYNAMIC referenced from text

...

I believe that the symbol __DYNAMIC is defined by the loader when you
use dynamic (instead of static) linking.  The g++ says (or implies)
that it doesn't have the correct crt0 program to handle dynamic
loading, so try telling ld(1) to statically link the program.

Roy
-- 
uucp:   {backbone}!rutgers!aramis.rutgers.edu!marantz
arpa:   marantz@aramis.rutgers.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads