login about faq

I get the following errors when trying to compile my "C" program with the Chilkat library:

/usr/lib/chilkat-9.5.0-x86_64-linux-gcc/lib/libchilkat-9.5.0.a(C_CkCrypt2.o):(.data.DW.ref.gxx_personality_v0[DW.ref.gxx_personality_v0]+0x0): undefined reference to __gxx_personality_v0'
/usr/lib/chilkat-9.5.0-x86_64-linux-gcc/lib/libchilkat-9.5.0.a(CkCrypt2.o): In functionCkCrypt2::createNew()':
CkCrypt2.cpp:(.text+0x710e): undefined reference to operator new(unsigned long)'
CkCrypt2.cpp:(.text+0x712b): undefined reference tooperator delete(void)'
CkCrypt2.cpp:(.text+0x713c): undefined reference to __cxa_begin_catch'
CkCrypt2.cpp:(.text+0x7141): undefined reference to__cxa_end_catch'
/usr/lib/chilkat-9.5.0-x86_64-linux-gcc/lib/libchilkat-9.5.0.a(CkCrypt2.o): In function CkCrypt2::~CkCrypt2()':
CkCrypt2.cpp:(.text+0x70fd): undefined reference tooperator delete(void)'

asked Dec 10 '15 at 10:18

chilkat's gravatar image

chilkat ♦♦
11.8k316358421


Anytime you see link errors such as this:

    /usr/lib/chilkat-9.5.0-x86_64-linux-gcc/lib/libchilkat-9.5.0.a(C_CkCrypt2.o):(.data.DW.ref.gxx_personality_v0[DW.ref.gxx_personality_v0]+0x0): undefined reference to __gxx_personality_v0'
    /usr/lib/chilkat-9.5.0-x86_64-linux-gcc/lib/libchilkat-9.5.0.a(CkCrypt2.o): In functionCkCrypt2::createNew()':
    CkCrypt2.cpp:(.text+0x710e): undefined reference to operator new(unsigned long)'
    CkCrypt2.cpp:(.text+0x712b): undefined reference tooperator delete(void*)'
    CkCrypt2.cpp:(.text+0x713c): undefined reference to __cxa_begin_catch'
    CkCrypt2.cpp:(.text+0x7141): undefined reference tocxa_end_catch'
where you see strings such as:
    gxx_personality
    operator new
    operator delete
    cxa_begin_catch
    cxa_end_catch
These are all indicators that you need to link the C++ runtime libs. To do that, use the g++ command instead of gcc.

Also.. compile and link your program in 2 steps. First compile using gcc w/ the "-c" option to produce a .o. The link with g++ so that the C++ runtime libs get linked in.

link

answered Dec 10 '15 at 10:21

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×65
×20
×11
×1

Asked: Dec 10 '15 at 10:18

Seen: 639 times

Last updated: Dec 10 '15 at 10:21

powered by OSQA