Link error undefined _exception_table_end__

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Link error undefined _exception_table_end__

ソリューションへジャンプ
1,160件の閲覧回数
wcampbell
Contributor I

I'm looking to pull in some c++ code into a c project in Codewarrior 10.3. The project built and ran fine before I added the new code, but now when I build I get a vague link error that says:

 

>Undefined : "_exception_table_end__"

>Referenced from "Ex68K_FindExceptionRecord(char*,MWExceptionInfo*)" in

C:/Freescale/CW MCU v10.3/MCU/ColdFire_Tools/Command_Line_Tools/mwldmcf|Linker|Error

>Undefined : "_exception_table_start__"

>Referenced from "Ex68K_FindExceptionRecord(char*,MWExceptionInfo*)" in

C:/Freescale/CW MCU v10.3/MCU/ColdFire_Tools/Command_Line_Tools/mwldmcf|Linker|Error

>Link failed.

 

The issue seems to be related to my use of "new" in one of my wrapper functions.

 

I have -Cpp_Exceptions OFF, since I'm not using them anywhere in my c++ code (and turning then on didn't affect the error). Are there some settings I need to enable/disable? I'm fairly new to mixing c and c++, so I may be missing something obvious.

Thanks.

ラベル(1)
0 件の賞賛
返信
1 解決策
969件の閲覧回数
Carlos_Musich
NXP Employee
NXP Employee

Hi!

These are linker generated names used in conjunction with STATICINIT and EXCEPTION directives in the linker command file (LCF). Open up a C++ default project and you'll see how they're used MCU_ColdFire_Compiler.pdf also has information about it. You can find this document in
C:\Freescale\CW MCU v10.3\MCU\Help\PDF


Basically it means that you apparently took a C rather than C++ lcf and the output binary has no C++ exception handling or static initialization support in it, which is obviously wrong. However, if you are trying to compile with an LCF for RAM which does not contain those symbols, please change your target to Flash and the project will eventually be correctly linked .

Hope this helps.

Carlos

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
970件の閲覧回数
Carlos_Musich
NXP Employee
NXP Employee

Hi!

These are linker generated names used in conjunction with STATICINIT and EXCEPTION directives in the linker command file (LCF). Open up a C++ default project and you'll see how they're used MCU_ColdFire_Compiler.pdf also has information about it. You can find this document in
C:\Freescale\CW MCU v10.3\MCU\Help\PDF


Basically it means that you apparently took a C rather than C++ lcf and the output binary has no C++ exception handling or static initialization support in it, which is obviously wrong. However, if you are trying to compile with an LCF for RAM which does not contain those symbols, please change your target to Flash and the project will eventually be correctly linked .

Hope this helps.

Carlos

0 件の賞賛
返信