home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!caen!zaphod.mps.ohio-state.edu!not-for-mail
- From: ren@function.mps.ohio-state.edu (Liming Ren)
- Newsgroups: comp.lang.c++
- Subject: How to call C++ functions in a C program?
- Date: 17 Dec 1992 11:55:53 -0500
- Organization: Department of Mathematics, The Ohio State University
- Lines: 16
- Distribution: world
- Message-ID: <1gqbepINNt6s@function.mps.ohio-state.edu>
- NNTP-Posting-Host: function.mps.ohio-state.edu
-
- Hi , Merry chrismas , everybody!
-
- I hope this queston makes sense.
-
- I know we can call C functions inside a C++ program. Is there a way to
- call a C++ function inside a C program? I tried to link a C program with
- a C++ function as follows:
-
- cc f.o g.c
-
- Where f.o has a very simple C++ function inside and g.c is a simple C
- program calling the function inside f.o. It dose not WORK!
-
- How to do this ? Please help!
-
- Many thanks!
-