Linker error undefined _start

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linker error undefined _start

Jump to solution
2,421 Views
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

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
1,187 Views
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

View solution in original post

0 Kudos
Reply
1 Reply
1,188 Views
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 Kudos
Reply