This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using string.h causes uv2.exe application error

Running NT and Keil V2.06. My app includes <string.h> because it calls memcpy.

Compile and link w no errors or warnings.
As soon as I hit the debug icon, I get a "uv2.exe - Application Error" window:
"The instruction at '0x004771ad' referenced memory at '0x00000000'. The memory could not be read. Click on OK to terminate the application. Click on CANCEL to debug the application.'"

Thanks,
Doug Hewett
software engineer
startrac

Parents
  • Linker warning.
    I wrote my own memcpy and compiled with no errors or warnings. Removed 'include <string.h>'. (Used char * instead of void *.)

    The linker gave warning L16 (see p. 90) about memcpy in string.c.

    So, globally renamed 'memcpy' to 'mmcopy', re-linked, and quess what?

    Yes, sports fans, it is unbelievable. The warning disappeared.

    Can anyone suggest a reference so that I gain a better understanding of what I'm doing wrong?

    Thanks.


Reply
  • Linker warning.
    I wrote my own memcpy and compiled with no errors or warnings. Removed 'include <string.h>'. (Used char * instead of void *.)

    The linker gave warning L16 (see p. 90) about memcpy in string.c.

    So, globally renamed 'memcpy' to 'mmcopy', re-linked, and quess what?

    Yes, sports fans, it is unbelievable. The warning disappeared.

    Can anyone suggest a reference so that I gain a better understanding of what I'm doing wrong?

    Thanks.


Children
No data