Re: Linking a C++ library to a C program.
- From: "Malcolm" <regniztar@xxxxxxxxxxxxxx>
- Date: Mon, 11 Jul 2005 20:23:58 +0000 (UTC)
"a2x" <add_aaron_2_x@xxxxxxxxxxx> wrote
>
> I am writing a C program which interfaces with a C++ library. The C++
> library works fine with C. I was wondering if I need to use a C++
> compiler (g++ in my case) to compile the C program or can I use a C
> compiler (gcc).
>
If you want to call a function written in C++ from a C file your best bet is
to write the C code in the common subset of the two languages and run it
through a C++ compiler. The alternative is to mess about with C++ name
mangling and linkage conventions.
.
- Follow-Ups:
- Re: Linking a C++ library to a C program.
- From: CBFalconer
- Re: Linking a C++ library to a C program.
- References:
- Linking a C++ library to a C program.
- From: a2x
- Linking a C++ library to a C program.
- Prev by Date: Re: Playing Music
- Next by Date: Re: nested while - how to go to the beginning of the first while?
- Previous by thread: Re: Linking a C++ library to a C program.
- Next by thread: Re: Linking a C++ library to a C program.
- Index(es):
Relevant Pages
|
|