Re: c++ calling c functions



Bill Reid wrote:
CBFalconer <cbfalconer@xxxxxxxxx> wrote:
teju wrote:

i am trying 2 merge 2 projects into one project.One project is
using c language and the other one is using c++ code.

both are working very fine independently.But now i need to merge
both and my c++ code should call c code.but when i tried to call
a function in c code externing that function in my c++ code, i am
getting unresolved external symbol error. Whatever i try its
giving more and more errrors...so is it possible to merge 2
projects?

if so how can i do that?

Follow the following organization. The result works for both C and
C++.

We're getting closer here...

----------- note from here on --------------
/* a C header file for linking to C++ */

...or C++ header file for linking to C...

No, you can't link C++ to C, in general.

--
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>
Try the download section.


--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • Re: p 145 K&R
    ... Bill Reid wrote: ... my opinion is it's a pretty bad book to try ... to learn the language. ... Eric Sosman ...
    (comp.lang.c)
  • Re: learn me c
    ... Bill Reid wrote: ... language, I want to change it to Objective-C where I'm living these ... I participate in other newsgroups where other languages are topical. ...
    (comp.lang.c)