home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!haven.umd.edu!news.umbc.edu!gmuvax2!mbenson
- From: mbenson@gmuvax2.gmu.edu (Michael Benson)
- Subject: Help with the linking of C and C++ files.
- Message-ID: <1993Jan22.053408.14225@gmuvax2.gmu.edu>
- Keywords: C++ object C link
- Organization: George Mason University, Fairfax, Virginia, USA
- Date: Fri, 22 Jan 1993 05:34:08 GMT
- Lines: 23
-
- I need some help.
-
- I have a piece of code which I know compiles correctly into an object
- file. The code is in the Microsoft C language. It has a header file
- that properally defines the prototypes.
-
- I include the header file in a new program that is written in Borland
- C++ (version 3.1). It compiles fine, but fails to link. It gives the
- error "undefined symbol xxxxx in module xxx.cpp" I know that for some
- reason the linker doesn't want to recognize the code in the c routine.
- I have tried (maybe naively) to use extern "C" with the header file, but
- that failed.
-
- The C code is just a standard function:
- int function ()
- { (somecode) };
-
- and the CPP code just calls it.
-
- Any ideas? I have already wasted 12 hours today alone.
-
- Michael
-
-