home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11648 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  1.6 KB

  1. Path: sparky!uunet!usc!news
  2. From: han@lipari.usc.edu (Jung-Hyun Han)
  3. Newsgroups: comp.lang.c++
  4. Subject: wow!! C++ interface
  5. Date: 28 Jul 1992 07:13:36 +0100
  6. Organization: University of Southern California, Los Angeles, CA
  7. Lines: 41
  8. Sender: han@lipari.usc.edu (Jung-Hyun Han)
  9. Distribution: world
  10. Message-ID: <l79pcgINN1h6@lipari.usc.edu>
  11. NNTP-Posting-Host: lipari.usc.edu
  12.  
  13. I have been in the dark for 5 days!! help me!!
  14.  
  15. I am linking C++ and FORTRAN.
  16. The makefile I made is as follows:
  17.  
  18. SUNLIBS = -L/usr/old -lcore77 -lcore -lsunwindow -lpixrect 
  19. X11LIBS = -L/usr/usc/X11/lib -lXaw -lXt -lX11
  20. FORLIBS = -lF77 -lI77 -lU77 
  21. LIBS =  $(FORLIBS) $(SUNLIBS) $(X11LIBS) -lm
  22.  
  23. P2OBJS = .....see below......
  24.  
  25. p2.exe: main.o solid.o
  26.     CC -Bstatic -s -O -o p2.exe main.o solid.o $(P2OBJS) $(LIBS) 
  27.     chmod a+x p2.exe
  28. main.o: main.c
  29.     CC -c main.c
  30. solid.o: solid.c solid.h
  31.     CC -c solid.c
  32.  
  33. where P2OBJS are FORTRAN object files and libraries which have routines
  34. called by main.c and solid.c
  35.  
  36. When I run the above makefile, I got linking error as follows:
  37. undefined symbol:
  38.     ___vtbl__4face
  39.  
  40. 1) I do NEVER write the above symbol in my source code.
  41. 2) I got intermediate C file, solid..c thru example>CC +i -c solid.c.
  42.    (You know CC always converts C++ into C, and works on C.)
  43.    Then I found solid..c has ___vtbl__4face!!!!!!
  44.    So I believe C++ compiler added the above undefined symbol ___vtbl__4face,
  45.    when it converts C file into C++ file.
  46.    
  47. How can I resolve this error?
  48. CC should have included some library which defined ___vtbl__4face.
  49. I cannot figure out why CC did not do so.
  50. I examined all I can do, but I failed to figure out......
  51. Please help me!!
  52.  
  53.  
  54.