I think the original function is declared as dllimport in the h file. This
is causing the warning.
Here is the code
void * memccpy(void *, const void *, int, size_t)
{
return NULL;
}
And here is the compiler warning.
warning C4273: 'memccpy' : inconsistent dll linkage
It linked without any errors, but if I was to call memcpy in my code it
would not call the one that I have written, it only calls the one in the
system library. Where in strlen's case the overloaded one got called.
AliR.
"Pete Delgado" <Peter.Delgado@noads.net> wrote in message
news:OIUiPhGyGHA.1256@TK2MSFTNGP04.phx.gbl...
"AliR" <AliR@online.nospam> wrote in message
news:44ef2249$0$15184$a8266bb1@reader.corenews.com...
I am not sure why that is, but if you try to overload memcpy you will
get
a
compiler warning.
Could you show the compiler warning and the code that you used to
generate
it? It seems to me that a correctly contructed function body should not
issue a compiler warning as this is the relm of the linker. I just tried
your suggestion with VS 2003 and didn't get a peep from either the
compiler
or linker.
-Pete