pkirk25 napsal:
Sorry if this is off topic but I'm not sure where to post it. 2 of us
are working on a small project - me doing the dll and him doing the
GUI. I have Visual Studio 2005 and he is using mingw.
Is it possible for him to use my dlls or should we simply send source
files to on another?
Hi. In general it is possible. But there may be some issues.
1. You have no problem when DLL has C interface
2. If you have DLL with C++ interface, all exported symbols will be
mangled, because C++ uses funcion overloading, so it must somehow
distinguish among overloaded function names. The way, how are symbols
named (mangled) is compiler specific.So for example DLL made in Gnu C++
exports symbols in different way than Visual Studio C++ compiler.
Sometimes you may be lucky and it could seem, that you are able to use
the DLL made in other compiler. But there may be big problem too.
Imagine you have following function in your DLL interface:
void Function(std::string& text);
Now imagine, that every compiler implements the standard library in
different way (although interface is (more or less) same). So you can
call such function placed in DLL made in compiler A, but you will pass
to it instance of std::string made in compiler B. It may have
completely different structure and it may cause "magic things" to
happen.
I wouldn't recommend to combine C++ DLL with code compiled in other
compiler and if you can, exchange sources with your partner.