Menu
Learn
Documentation
Language Reference
Library Reference
Command-line Reference
Feature Overview
Articles
Downloads
Packages
Community
Blog
Orgs using D
Twitter
Calendar
Forums
IRC
Wiki
GitHub
Issues
Get involved
Contributors
Foundation
Donate
Sponsors
Resources
Tour
Books
Tutorials
Tools
Editors
IDEs
Visual D
Acknowledgments
D Style
Glossary
Sitemap
Search
Entire Site
Language
Library
Forums
Learn group
This thread
go
Forums
Forum Index
New users
Learn
Community
General
Announce
Improvements
DIP Ideas
DIP Devel.
Ecosystem
GDC
LDC
Debuggers
IDEs
DWT
Development
Internals
Issues
Beta
DMD
Phobos
Druntime
Study
Turkish
Genel
Duyuru
Log in
Settings
Help
Index
»
Learn
»
Linking with/Debugging static C/C++ libraries
»
Post reply
Warning: the post you are replying to is from 14 years ago (May 30, 2011).
Posting to
Learn
in reply to
Jeff Slutter
Your name:
Your email address (
?
):
Subject:
Message:
On Monday, 30 May 2011 at 02:13:32 UTC, Jeff Slutter wrote: > I'm just starting out in my journey of R&D/evaluation of using > D, as a possible future development platform, for my team at > work. I like a lot of what I see! > > Currently we do all our development in Visual Studio, using > C/C++ (and C# for some tools), and it is definitely the > 'comfort zone' for the team. My goal is to reduce the learning > curves, and new tools they'll have to pick up. The Visual D > project is of great interest to me. > > One of the things that's important to us is being able to link > against some existing C/C++ static libraries (built with VS > 2008, so PE COFF format). In some light testing I was able to > link a D2 project with a C/C++ Static library project in > VS/VisualD with DMD. I had to use the objconv.exe tool, as the > Digital Mars tool coff2omf.exe seems to be too old to work with > the newer MS generated libraries. Unfortunately, it looks like > objconv will always strip out debugging information, and while > I had successful link and execution, I could only debug the D > code, there was no debugging information for the C/C++ code. > > I suppose if the C/C++ code was in a DLL and D referenced the > import lib, things would work much better, but there are some > cases where our applications really need to come as a single > executable and not have dependent DLLs along for the ride. > > Am I missing some sort of process or tool to make this all > happen how I want? I want to be able to link C/C++ static > libraries, generated with Visual Studio, with DMD, and maintain > debugging information. Yes, I know, that is not a simple > request. :) > > For what it's worth, using GDC and GCC/MingW (TDM), I was able > to build and debug a D/C/C++ mixed executable. I had to use GDB > (though WinGDB works just dandy), but the downside is I'm not > using Visual D (unless Visual D supports GDC??), nor DMD. DMD > seems that it would be more supported and stable right now than > GDC, which seems to play catch up. I worry that, as a user of > GDC, hitting a compiler bug, would take longer to get an > official fix for, than it would for DMD. > > Thanks everyone... > Jeff
Enable
Markdown
Copyright © 1999-2021 by the
D Language Foundation