public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: iamatul@comcast.net
To: gcc-help@gcc.gnu.org
Subject: Linking C functions into C++ objects
Date: Sat, 08 Jul 2006 19:53:00 -0000	[thread overview]
Message-ID: <070820061953.12187.44B00D50000B1C9700002F9B2205886172049A9B0E030E07@comcast.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

I am trying to write a small program which dynamically loads a C shared
library and create wrapper objects in C++.  gcc version is 3.4.5 and
platform is Gentoo Linux.

Under Linux, gcc & g++ are similar i.e. generate object code and
the extern "C" or extern "C++" prefix only affect at link time ?
(could be wrong, please correct).

Now, when I link, I get all kinds of error messages with test.c
and best.cpp.  I have attached the tar ball if someone could
look into it ?

I wrote two versions where the code is compiled with gcc or
with g++.  Both give same error.

Thanks in advance.
--
Atul

[-- Attachment #2: resolver.tar.gz --]
[-- Type: application/octet-stream, Size: 3458 bytes --]

                 reply	other threads:[~2006-07-08 19:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=070820061953.12187.44B00D50000B1C9700002F9B2205886172049A9B0E030E07@comcast.net \
    --to=iamatul@comcast.net \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).