D - D and msvcrt.dll
- c-peņa12 hotmail.com (8/15) Feb 01 2004 D and msvcrt.dll
- Ilya Minkov (11/17) Feb 02 2004 As it says, you have to get the source and compile it yourself with
- c-peņa12 hotmail.com (4/21) Feb 03 2004 I'll try to rebuild the libraries my self then. I've read somewhere of a...
- Ilya Minkov (19/22) Feb 05 2004 http://ikagames.com/andy/d/
- Walter (5/18) Feb 04 2004 Probably not. The msvcrt.dll is very specific to Microsoft C++. Your bes...
D and msvcrt.dll Is it possible to use libraries built with the msvcrt.dll runtime? I wanted to use the libxml2 library but the binary download page says: http://www.zlatkovic.com/libxml.en.htmlNotes All binaries which you can download from this site use the multithreaded dynamic C-runtime (msvcrt.dll). Every program you compile using these binaries must use the same runtime. Unless you like your app crashing, set up your project to use msvcrt.dll. If you for some reason must use a different runtime, then you must get the source and compile libxml and friends yourself.Can a D program use those libxml binaries? Thanks Carlos Peņa c-peņa12_at_hotmail_dot_com
Feb 01 2004
c-peņa12 hotmail.com wrote:As it says, you have to get the source and compile it yourself with DigitalMars C&C++ Compiler. This "issue" is not specific to D, it is just that you have to recompile the library for each other C compiler you are ging to use it with, or when the underlying C library gets major changes etc. Besides, you'll need to write import libraries. Those are modules wrapped in extern(C){ ... } and consisiting only of prototypes you need and corresponding type definitions. It's mostly copy&paste since syntax is so similar. -eyelike your app crashing, set up your project to use msvcrt.dll. If you for some reason must use a different runtime, then you must get the source and compile libxml and friends yourself.Can a D program use those libxml binaries?
Feb 02 2004
In article <bvlfbm$min$1 digitaldaemon.com>, Ilya Minkov says...c-peņa12 hotmail.com wrote:I'll try to rebuild the libraries my self then. I've read somewhere of a SWIG port for D, that could help me building the wrapers, right? Thanks for your response.As it says, you have to get the source and compile it yourself with DigitalMars C&C++ Compiler. This "issue" is not specific to D, it is just that you have to recompile the library for each other C compiler you are ging to use it with, or when the underlying C library gets major changes etc. Besides, you'll need to write import libraries. Those are modules wrapped in extern(C){ ... } and consisiting only of prototypes you need and corresponding type definitions. It's mostly copy&paste since syntax is so similar. -eyelike your app crashing, set up your project to use msvcrt.dll. If you for some reason must use a different runtime, then you must get the source and compile libxml and friends yourself.Can a D program use those libxml binaries?
Feb 03 2004
c-peņa12 hotmail.com wrote:I'll try to rebuild the libraries my self then. I've read somewhere of a SWIG port for D, that could help me building the wrapers, right?http://ikagames.com/andy/d/ However, i haven't tried it, but i think it will only be of help with (primarily C++ libraries which cannot be easily converted by hand) for which headers prepared for SWIG already exist. There is another thing: you don't need wrappers, you only need declarations. What SWIG does (according to the manual), it kills most types and writes 2 layers of wrappers, which is more bloat than you need. This seems to be a design decision, because its primary purpose was to make communication between C/C++ and really off-the-ground languages possible, such as scripting (Perl, Python, Ruby) and languages with totally diverging typesystems, such as Sather. Besides, the effort of converting headers so that SWIG can understand them must also be considered. There was a page from Mike Wynn on how C headers map to D imports, but it seems to have disappeared by now. There must be enough info in the docs though.Thanks for your response.You're welcome! -eye
Feb 05 2004
<c-peņa12 hotmail.com> wrote in message news:bvjl0u$kva$1 digitaldaemon.com...D and msvcrt.dll Is it possible to use libraries built with the msvcrt.dll runtime? I wanted to use the libxml2 library but the binary download page says: http://www.zlatkovic.com/libxml.en.htmlProbably not. The msvcrt.dll is very specific to Microsoft C++. Your best route to success would be to recompile libxml with DMC++, this will eliminate dependency on msvcrt.dll.Notes All binaries which you can download from this site use the multithreaded dynamic C-runtime (msvcrt.dll). Every program you compile using these binaries must use the same runtime. Unless you like your app crashing, set up your project to use msvcrt.dll. If you for some reason must use a different runtime, then you must get the source and compile libxml and friends yourself.Can a D program use those libxml binaries?
Feb 04 2004