home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!news
- From: han@lipari.usc.edu (Jung-Hyun Han)
- Newsgroups: comp.lang.c++
- Subject: wow!! C++ interface
- Date: 28 Jul 1992 07:13:36 +0100
- Organization: University of Southern California, Los Angeles, CA
- Lines: 41
- Sender: han@lipari.usc.edu (Jung-Hyun Han)
- Distribution: world
- Message-ID: <l79pcgINN1h6@lipari.usc.edu>
- NNTP-Posting-Host: lipari.usc.edu
-
- I have been in the dark for 5 days!! help me!!
-
- I am linking C++ and FORTRAN.
- The makefile I made is as follows:
-
- SUNLIBS = -L/usr/old -lcore77 -lcore -lsunwindow -lpixrect
- X11LIBS = -L/usr/usc/X11/lib -lXaw -lXt -lX11
- FORLIBS = -lF77 -lI77 -lU77
- LIBS = $(FORLIBS) $(SUNLIBS) $(X11LIBS) -lm
-
- P2OBJS = .....see below......
-
- p2.exe: main.o solid.o
- CC -Bstatic -s -O -o p2.exe main.o solid.o $(P2OBJS) $(LIBS)
- chmod a+x p2.exe
- main.o: main.c
- CC -c main.c
- solid.o: solid.c solid.h
- CC -c solid.c
-
- where P2OBJS are FORTRAN object files and libraries which have routines
- called by main.c and solid.c
-
- When I run the above makefile, I got linking error as follows:
- undefined symbol:
- ___vtbl__4face
-
- 1) I do NEVER write the above symbol in my source code.
- 2) I got intermediate C file, solid..c thru example>CC +i -c solid.c.
- (You know CC always converts C++ into C, and works on C.)
- Then I found solid..c has ___vtbl__4face!!!!!!
- So I believe C++ compiler added the above undefined symbol ___vtbl__4face,
- when it converts C file into C++ file.
-
- How can I resolve this error?
- CC should have included some library which defined ___vtbl__4face.
- I cannot figure out why CC did not do so.
- I examined all I can do, but I failed to figure out......
- Please help me!!
-
-
-