From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6902 invoked by alias); 21 Aug 2008 13:43:36 -0000 Received: (qmail 6890 invoked by uid 22791); 21 Aug 2008 13:43:35 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.187) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 21 Aug 2008 13:43:00 +0000 Received: by nf-out-0910.google.com with SMTP id c10so639090nfd.6 for ; Thu, 21 Aug 2008 06:42:57 -0700 (PDT) Received: by 10.210.61.8 with SMTP id j8mr1933857eba.123.1219326177816; Thu, 21 Aug 2008 06:42:57 -0700 (PDT) Received: by 10.210.140.6 with HTTP; Thu, 21 Aug 2008 06:42:57 -0700 (PDT) Message-ID: Date: Thu, 21 Aug 2008 13:51:00 -0000 From: PEACEYALL To: gcc-help@gcc.gnu.org Subject: GtkSpell Link Error MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00216.txt.bz2 Hello, I am trying to dynamically link the gtkspell library which is coded in C with my program which is coded in C++. Merely when I try to compile it, g++ outputs the following error: /tmp/ccDGjLyg.o: In function `ConvoWin::appendPage(Gtk::TreeIter&)': ConvoWin.cpp:(.text+0x67e8): undefined reference to `gtkspell_new_attach(_GtkTextView*, char const*, _GError**)' collect2: ld returned 1 exit status The example programs that came along with the library compiled, linked and worked perfectly fine. I even coded a small test program in C and it compiled and linked with gcc to the gtkspell library perfect fine too. Although, if I try to compile the test program with g++ with the "-x c" argument, it compiles and links properly, but when I try to compile it with the "-x c++" argument, it too results in the error above. Why is it that linking the gtkspell library to C code works while linking it to C++ code results in the error mentioned above? Likewise, is there any fix for this issue that will allow me to link the gtkspell library into my C++ code? Any amendments or suggestions will be kindly appreciated. Thank you.