`std::terminate(void)'

Hello,

When I compile a C++ program with CodeWarrior, it works.
When I compile the same program with qcc, I get the following error:

/home/alain/proj/iom/code/v_disk/v_disk.a(v_disk_cfg.o): In function V_Disk::parse_config(char *)': v_disk_cfg.o(.text+0x14d): undefined reference to std::terminate(void)’
cc: /usr/ntox86/bin/ld error 1

There is no ‘std::terminate’ in my code, and I don’t see it if I enable the pre-processor, so where is this error coming from?

Any help would be greatly appreciated.
Alain.

std::terminate is part of the C++ exception handling mechanism (it is the
handler function for uncaught exceptions, and guess what - it terminates!)

This function is in libcpp.so.2, which you will automatically pull in if you
use QCC rather than qcc or pass -lang-c++ to your qcc link line.

Alain Achkar <alain_nospam@storagequest.com> wrote:

Hello,

When I compile a C++ program with CodeWarrior, it works.
When I compile the same program with qcc, I get the following error:

/home/alain/proj/iom/code/v_disk/v_disk.a(v_disk_cfg.o): In function V_Disk::parse_config(char *)': v_disk_cfg.o(.text+0x14d): undefined reference to std::terminate(void)’
cc: /usr/ntox86/bin/ld error 1

There is no ‘std::terminate’ in my code, and I don’t see it if I enable the pre-processor, so where is this error coming from?

Any help would be greatly appreciated.
Alain.


cburgess@qnx.com