CodeWarrior Linking Ansi library

Started by eric_cina October 26, 2006
Hi. I have been using CodeWarrior with my A128 micro. I've recently
run into a problem with my new project where CodeWarrior does not link
any Ansi library. I cannot do any switch (case) statements and some
bit shifting (<< or >>) does not work. I am using small memory model
and I thought it should automatically link in one of the ansi*.lib
files but it does not.

Any ideas?

Thx,
Eric
Hi Eric,
The runtime library (the functions to handle switches, shifting, etc) are
part of the ansi library. You do not need to worry about getting it linked
with the application, as the linker will do dead code/data stripping and
only objects used are linked.
The linker does not automatically link one of the libraries.

Erich

-----Original Message-----
From: 6... [mailto:6...] On Behalf Of
eric_cina
Sent: Thursday, October 26, 2006 3:17 AM
To: 6...
Subject: [68HC12] CodeWarrior Linking Ansi library
Hi. I have been using CodeWarrior with my A128 micro. I've recently
run into a problem with my new project where CodeWarrior does not link
any Ansi library. I cannot do any switch (case) statements and some
bit shifting (<< or >>) does not work. I am using small memory model
and I thought it should automatically link in one of the ansi*.lib
files but it does not.

Any ideas?

Thx,
Eric
So what do I need to do to get CodeWarrior to link in the libraries
needed for bit shifting (module BSHRU and BSHL) and case statements
(modules CASE_CHECKED and CASE_CHECKED_BYTE)? Currently certain bit
shifting operations fail during linking and all case statements fail
during linking, although the compiler does not complain just the
linker.

Thx,
Eric

--- In 6..., "Erich Styger"
wrote:
>
> Hi Eric,
> The runtime library (the functions to handle switches, shifting,
etc) are
> part of the ansi library. You do not need to worry about getting
it linked
> with the application, as the linker will do dead code/data
stripping and
> only objects used are linked.
> The linker does not automatically link one of the libraries.
>
> Erich
>
> -----Original Message-----
> From: 6... [mailto:6...] On
Behalf Of
> eric_cina
> Sent: Thursday, October 26, 2006 3:17 AM
> To: 6...
> Subject: [68HC12] CodeWarrior Linking Ansi library
> Hi. I have been using CodeWarrior with my A128 micro. I've
recently
> run into a problem with my new project where CodeWarrior does not
link
> any Ansi library. I cannot do any switch (case) statements and
some
> bit shifting (<< or >>) does not work. I am using small memory
model
> and I thought it should automatically link in one of the ansi*.lib
> files but it does not.
>
> Any ideas?
>
> Thx,
> Eric
>
>
Hi Eric,
You need to link the correct (corresponding to your memory model/etc)
library to your application.
You find information about the different libraries e.g. in the readme file
in lib\hc12c.
If you are working with the CodeWarrior IDE, you simply can drag&drop the
library file to your project/project file list. Or you can add it manually
to the linker (.prm) file if you want.

Erich

-----Original Message-----
From: 6... [mailto:6...] On Behalf Of
eric_cina
Sent: Thursday, October 26, 2006 7:02 PM
To: 6...
Subject: [68HC12] Re: CodeWarrior Linking Ansi library
So what do I need to do to get CodeWarrior to link in the libraries
needed for bit shifting (module BSHRU and BSHL) and case statements
(modules CASE_CHECKED and CASE_CHECKED_BYTE)? Currently certain bit
shifting operations fail during linking and all case statements fail
during linking, although the compiler does not complain just the
linker.

Thx,
Eric

--- In 6..., "Erich Styger"
wrote:
>
> Hi Eric,
> The runtime library (the functions to handle switches, shifting,
etc) are
> part of the ansi library. You do not need to worry about getting
it linked
> with the application, as the linker will do dead code/data
stripping and
> only objects used are linked.
> The linker does not automatically link one of the libraries.
>
> Erich
>
> -----Original Message-----
> From: 6... [mailto:6...] On
Behalf Of
> eric_cina
> Sent: Thursday, October 26, 2006 3:17 AM
> To: 6...
> Subject: [68HC12] CodeWarrior Linking Ansi library
> Hi. I have been using CodeWarrior with my A128 micro. I've
recently
> run into a problem with my new project where CodeWarrior does not
link
> any Ansi library. I cannot do any switch (case) statements and
some
> bit shifting (<< or >>) does not work. I am using small memory
model
> and I thought it should automatically link in one of the ansi*.lib
> files but it does not.
>
> Any ideas?
>
> Thx,
> Eric
>
>