GtkSpell Link Error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux