--- Rob Light <rlight@...> wrote: > Mumit Khan wrote:
> > On Thu, 28 Jun 2001, Rob Light wrote:
> What version of the GNU linker supports direct linking to DLLs?
2.10 and above
> tried this but it still can't find the symbols. It may be because
> a C++ DLL :(
> > Of course, I'm assuming that the 3rd party DLL is not C++, in which
> > it simply won't work.
> Can you elaborate why this won't work for C++? Is this because of
> mangled symbol names?
This used to be in G++ faq, but I couldn't find recent version on-line,
"Why can't I link g++-compiled programs against libraries compiled by
some other C++ compiler?"
"Some people think that, if only the FSF and Cygnus Support folks would
stop being stubborn and mangle names the same way that, say, cfront
does, then any g++-compiled program would link successfully against any
cfront-compiled library and vice versa. Name mangling is the least of
the problems. Compilers differ as to how objects are laid out, how
multiple inheritance is implemented, how virtual function calls are
handled, and so on, so if the name mangling were made the same, your
programs would link against libraries provided from other compilers but
then crash when run. For this reason, the ARM encourages compiler
writers to make their name mangling different from that of other
compilers for the same platform. Incompatible libraries are then
detected at link time, rather than at run time. "
http://messenger.yahoo.com.au - Yahoo! Messenger
- Voice chat, mail alerts, stock quotes and favourite news and lots more!