Keil Logo Arm Logo

Discussion Forum

Linking math library (C166 tool set, ST10F276), using uVision 4 IDE

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Pavan Kumar
Posted
30-Sep-2010 18:53 GMT
Toolset
C166
New! Linking math library (C166 tool set, ST10F276), using uVision 4 IDE

Hi,

I am using the keil IDE uvision 4.0, If try to build the project with a file that uses math functions (i have included a reference to math.h), i get linker errors. I am using the IDE linker and not invoking from the command prompt, at first i thought that the IDE does not know where the C167FPS.LIB file is ? (C:\Keil\C166\lib), i checked the settings and they seem to be right, i am not sure if i need to manually specify the library to the linker ?, if so , how so i do not see a option in the project settings (i see, C166 locate, C166 misc) but no option to link to a library file. Could somebody point me in the right direction ?

Thanks for all the help,
Pavan.

Read-Only
Author
erik Malund
Posted
30-Sep-2010 19:10 GMT
Toolset
C166
New! RE: Linking math library (C166 tool set, ST10F276), using uVision 4 IDE

i get linker errors. I am using the IDE linker and not invoking from the command prompt, at first i thought that the IDE does not know where the C167FPS.LIB file is ?

which linker errors
if you use the eval - is math.h part of the eval? floating point is not

Erik

Read-Only
Author
Pavan Kumar
Posted
30-Sep-2010 19:14 GMT
Toolset
C166
New! RE: Linking math library (C166 tool set, ST10F276), using uVision 4 IDE

This is the following i get, and i am not using the eval version, i believe i have a regular (purchased) version of the product, I noticed MATH.h under the inc folder.

linking...
*** WARNING L7: MODULE NAME NOT UNIQUE MODULE: C:\KEIL\C166\LIB\C167FPS.LIB (LOG)
*** ERROR L127: UNRESOLVED EXTERNAL SYMBOL SYMBOL: log MODULE: C:\KEIL\C166\LIB\C167FPS.LIB (POW)
*** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: log MODULE: C:\KEIL\C166\LIB\C167FPS.LIB (POW) ADDRESS: F140H

Read-Only
Author
erik Malund
Posted
30-Sep-2010 21:36 GMT
Toolset
C166
New! believe???

i believe i have a regular (purchased) version of the product
how can you not KNOW
what is the basis for your belief

frst remove the warning, it may very well be the reason for the errors

Read-Only
Author
Pavan Kumar
Posted
30-Sep-2010 21:41 GMT
Toolset
C166
New! RE: believe???

It is not a eval version, you may be right about the warning, the help text says that
"The specified module name is used for more than one module. The specified module name is not processed.", where i can change these settings ?

Read-Only
Author
Hans-Bernhard Broeker
Posted
30-Sep-2010 22:44 GMT
Toolset
C166
New! RE: believe???

where i can change these settings ?

It's rather doubtful that this depends on any "settings".

The warning is about two modules (roughly translates to: *.obj files) in the link having the same name. One of those is in the math library --- so your earlier doubt about the math library not having been found was clearly unfounded. Now the question remains: where is the other module of the same name?

Is there, by any chance, a sourcefile called "log.c" in your program? If so, you may want to rename that.

Read-Only
Author
Pavan Kumar
Posted
30-Sep-2010 23:01 GMT
Toolset
C166
New! RE: believe???

Great !, that solved the issue, i had file name log.c, however it is not clear to me as having a file name verbatim to a function in library was causing this issue ?, thanks for helping me out :)

Read-Only
Author
Hans-Bernhard Broeker
Posted
1-Oct-2010 00:31 GMT
Toolset
C166
New! RE: believe???

as having a file name verbatim to a function in library was causing this issue ?

That wasn't causing it. The conflict was between module names. For C files, those are, basically, the source filenames (without the .c).

I.e. the C library has its implementation of standard library function log() in a file called, not altogether surprisingly, log.c. The module name of that is LOG (that's what the error message showed). The module name of your own source file log.c is also LOG. Thus the conflict.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.