StartCore and C++ code -> linker erroro ""__exception_table_start__" is unresolved

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

StartCore and C++ code -> linker erroro ""__exception_table_start__" is unresolved

1,834 次查看
pawel_a
Contributor I
Hi,

I've created C++ code like below. But I cannot link it. I see linker error. Do I need link additional lib for this symbol?

-------------- LINK ERROR ---------------------------------------------
[LNK,2,6999,-1]: Error: "__exception_table_start__" is unresolved, referenced from:
        d:\fpdc_dsp\starcore\tools\compiler\lib\sc140\rtlib_be.elb(ExceptHandlerTSasm.eln)

[LNK,2,6999,-1]: Error: "__exception_table_end__" is unresolved, referenced from
:
        d:\fpdc_dsp\starcore\tools\compiler\lib\sc140\rtlib_be.elb(ExceptHandlerTSasm.eln)

-------------- CODE ---------------------------------------------
class A
{
       metod(){};
};


main()
{

A a[2];

    a[1].metod();
标签 (1)
0 项奖励
回复
1 回复

624 次查看
CrasyCat
Specialist III
Hello
 
When you are building C++ code there are some additional predefined sections that you need to place in your linker command file and you need to define some linker symbols that he startup code will use to run properly..
The additional sections are: .staticinit, .exception and .exception_index.
The additional symbols are
_cpp_staticinit_start, _cpp_staticinit_end, , __exception_table_start__, , __exception_table_end__
 
Attached is a small example project for CodeWarrior StarCore V3.2.
Project is set up for SC140 simulator, but should show you how to activate/build C++ with StarCore build tools.
 
CrasyCat
Message Edited by t.dowe on 2009-09-04 11:03 AM
0 项奖励
回复