|
Linking ProblemNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Mohit Gupta Posted 26-Jun-2001 18:53 GMT Toolset None |  Linking Problem Mohit Gupta I have faced a peculiar problem today. My program gave linking error. It could not locate the strcpy or strncpy functions though I had included the string.h file. I then included the c51flp.lib file in my project. The error was removed and the hex file was generated.
Then I removed the c51flp.lib file. This time on compiling, the errors didnot come. I am wondering why the errors didnot come again? Can anybody help!
Mohit | | Read-Only Author Andrew Neil Posted 26-Jun-2001 20:29 GMT Toolset None |  RE: Linking Problem Andrew Neil First, header files have nothing to do with the linker; they are purely a 'C' source issue.
Do you mean c51fpl.lib? That's a floating point library, so shouldn't affect strcpy or strncpy.
Maybe your library search path was wrong and, as a side-effect of adding c51fpl.lib, you happened to fix it. That would explain why you could then remove c51fpl.lib and the errors not re-appear? | | Read-Only Author Mohit Gupta Posted 27-Jun-2001 03:36 GMT Toolset None |  RE: Linking Problem Mohit Gupta How and where do you specify the library search path in UV2?
Mohit | | Read-Only Author Andrew Neil Posted 27-Jun-2001 09:26 GMT Toolset None |  RE: Linking Problem Andrew Neil Project/File Extensions, Books and Environment On the 'Environment Setup' tab, you have the choice of either 'Use settings from TOOLS.INI file' or spcific paths.
Note that these settings are stored in the Project file (.uv2); however, since the Library location is usually defined by the Keil installation, I think it's better to use the TOOLS.INI file - otherwise you project may not be portable to a different Keil installation. | | Read-Only Author Jon Ward Posted 26-Jun-2001 21:02 GMT Toolset None |  RE: Linking Problem Jon Ward Are you using in-line assembly or are you using the SRC directive? AND, are you using no other C files in your project?
If that's the case, see the following:
http://www.keil.com/support/docs/1646.htm
Jon | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|