Linker error undefined _start

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

Linker error undefined _start

跳至解决方案
2,422 次查看
stbohne
Contributor II

I'm trying to compile a simple c program (void main() {}) on the command line (CodeWarrior for Microcontrollers V6.3) and get the following error:

 

"c:\Programme\Freescale\CodeWarrior for Microcontrollers V6.3\ColdFire_Tools\Command_Line_Tools\mwccmcf.exe" main.c### mwldmcf.exe Linker Error:#   Undefined : "_start"Errors caused tool to abort.### mwccmcf Driver Error:#   linker 'C:\Programme\Freescale\CodeWarrior for Microcontrollers#   V6.3\ColdFire_Tools\Command_Line_Tools\mwldmcf.exe' returned with exit#   code 1Errors caused tool to abort.

 

How do I point the linker to the startup code? And why doesn't it use the default? Or is it maybe an underscore problem?

 

 

Thanks in advance,

Stefan

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,188 次查看
CrasyCat
Specialist III

Hello

 

Did you try defining the environment variables MWLibraries and MWLibraryFiles on your system.

  MWLibraries contains paths to the library files

  MWLibraryFiles contains names of the library files to link to the application.

 

Check {Install}\(CodeWarrior_Examples)\CmdlineTools\Commandline.bat for example how these are set up.

 

Alternatively you should add the name of the run time library to your linker command line. 

 

The library you need to link to your project depends on the options you are using for building.

Please refer to {Install}\Help\PDF\ColdFire_Build_Tools_Reference.pdf chapter "Coldfire Runtime Libraries" section "MSL for Coldfire Development -> "Using MSL Libraries" for information on which library to select according to your compiler settings.

 

CrasyCat

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,189 次查看
CrasyCat
Specialist III

Hello

 

Did you try defining the environment variables MWLibraries and MWLibraryFiles on your system.

  MWLibraries contains paths to the library files

  MWLibraryFiles contains names of the library files to link to the application.

 

Check {Install}\(CodeWarrior_Examples)\CmdlineTools\Commandline.bat for example how these are set up.

 

Alternatively you should add the name of the run time library to your linker command line. 

 

The library you need to link to your project depends on the options you are using for building.

Please refer to {Install}\Help\PDF\ColdFire_Build_Tools_Reference.pdf chapter "Coldfire Runtime Libraries" section "MSL for Coldfire Development -> "Using MSL Libraries" for information on which library to select according to your compiler settings.

 

CrasyCat

0 项奖励
回复