From: Tor L. <tm...@ik...> - 2007-11-18 16:33:40
|
This very issue has been discussed on this list last week. Read the archives. > Is this compiler/linker bug ? No. This is documented behaviour (I hope) and should be reasonably common knowledge among programmers targeting Windows. I don't know if the C standard says anything about what one can expect from comparing function pointers passed between separately compiled and linked units. Presumably the standard leaves enough leeway for this to be compliant behaviour. > problem in libxml could be avoided [if] fprintf > is declared as __declspec(dllimport) in all cases. Well, duh. Look in stdio.h: _CRTIMP int __cdecl fprintf (FILE*, const char*, ...); What do you think the _CRTIMP means? Where else do you declare fprintf if not in stdio.h? --tml |