Article View: gnu.g++
Article #27g++ and sunview (again)
From: Sho Kuwamoto
Date: Wed, 05 Jul 1989 04:41
Date: Wed, 05 Jul 1989 04:41
36 lines
1518 bytes
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.
Technical Details
Message-ID:
<2343@pur-phy>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!purdue!mentor.cc.purdue.edu!pur-ee!pur-phy!shoShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!purdue!mentor.cc.purdue.edu!pur-ee!pur-phy!sho From: sho@pur-phy (Sho Kuwamoto) Newsgroups: gnu.g++ Subject: g++ and sunview (again) Message-ID: <2343@pur-phy> Date: 5 Jul 89 04:41:40 GMT Reply-To: sho@newton.physics.purdue.edu.UUCP (Sho Kuwamoto) Organization: Purdue Univ. Physics Dept., W. Lafayette, IN Lines: 36